From 9a64fa84a67e2e09a69330c7c9073fe4201bd036 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 16 Apr 1989 23:29:02 +0000 Subject: 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]; -- cgit v1.2.3 From 8fc3406de34e6468a2ed5160e8f94e010d3b2f3c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 27 Apr 1989 23:39:20 +0000 Subject: 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" -- cgit v1.2.3 From 37b45064f63d516428e6434dfc3cf9f3cd7b3865 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 2 Sep 1989 08:47:33 +0000 Subject: 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" -- cgit v1.2.3 From 21f5db744ea5f992f540432e9c819c5e4e8c0786 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 18 Feb 1990 21:25:20 +0000 Subject: 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" -- cgit v1.2.3 From 76ba4af044e195f4a6dee2810738b4ad309739f4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 14 Sep 1990 07:40:01 +0000 Subject: 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 -- cgit v1.2.3 From 9729f2614e0216a7a4e514dac0842707cbae5ad5 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 26 Sep 1990 00:00:16 +0000 Subject: 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 -- cgit v1.2.3 From 6f6c99566c9c6c5c464280c52107f56134985d7b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 1 Oct 1990 20:46:05 +0000 Subject: 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> -- cgit v1.2.3 From 19fa5b7438516c4a72466a8bec3901d67fc2bfe7 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 3 Oct 1990 00:10:50 +0000 Subject: 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]; -- cgit v1.2.3 From 6206289a00346b73b06cea85fe20c0da05dc60b9 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 25 Oct 1990 09:16:59 +0000 Subject: 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. */ -- cgit v1.2.3 From 60293bd0ac1f928f5f543de46f4e67fb01a933b1 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 2 Nov 1990 06:11:13 +0000 Subject: 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 -- cgit v1.2.3 From db442a6db5010864daf01d4c6413988269213fb5 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 5 Dec 1990 04:02:48 +0000 Subject: 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 -- cgit v1.2.3 From 9bbcfdb0c7804ba25a06ee20b73cff2904a091f2 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 7 Dec 1990 05:49:36 +0000 Subject: 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> -- cgit v1.2.3 From 1ae77d2b200f2dcaeea37dcc81737091949c1924 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 7 Dec 1990 06:56:38 +0000 Subject: 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 -- cgit v1.2.3 From f57cb2b9fc1dc61c8c0ce234267fc6618f79b91d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 14 Dec 1990 09:30:10 +0000 Subject: 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]; -- cgit v1.2.3 From 6506fcd3732a579a0c54678397924d0322b0349c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 14 Dec 1990 09:30:27 +0000 Subject: 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]; -- cgit v1.2.3 From d2186fdb660589c1c0c22b181dd7be4b96a6fdfe Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 18 Jan 1991 09:59:14 +0000 Subject: 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 -- cgit v1.2.3 From 6c67a5fa97896bb05ea929b8c0fc4fac24b6eb93 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 30 Jan 1991 10:00:32 +0000 Subject: 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" -- cgit v1.2.3 From 65f624f521f191f502cc8f5d41a9cb4f1c8d4142 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 27 Feb 1991 05:24:58 +0000 Subject: 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 -- cgit v1.2.3 From 98e4049505275e389e8317f3ee65e187538f56cd Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 1 Apr 1991 22:24:10 +0000 Subject: 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 -- cgit v1.2.3 From 433b6bacf03b7934374dec5c439b6439a48dc1c2 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 12 Apr 1991 22:08:09 +0000 Subject: 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 -- cgit v1.2.3 From deac00f40f4ea52ecdf894e863764a7691ff293f Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 10 Jun 1991 21:50:48 +0000 Subject: 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 -- cgit v1.2.3 From cc0501b97c93f7e6b3fefebb56e509a98f0cc230 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 10 Jun 1991 22:54:16 +0000 Subject: 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 -- cgit v1.2.3 From 886d17ccf6d6568299ac6c2c030a649e2ac8e7e3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 10 Jun 1991 23:58:11 +0000 Subject: 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) -- cgit v1.2.3 From b84d36e04f96355dffa7daab48b4237040ef3b38 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 10 Jun 1991 23:59:04 +0000 Subject: 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 -- cgit v1.2.3 From 1c3277132cffbf786817ad3b02405c9a0d7e3012 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 11 Jun 1991 01:20:19 +0000 Subject: 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 -- cgit v1.2.3 From 83a57513860d30d5a9c8e0078a1b7ecf447a3c88 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 11 Jun 1991 01:20:23 +0000 Subject: 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 -- cgit v1.2.3 From 71bc903578cb388c624c48a499f733863f1bc531 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 12 Jun 1991 18:26:17 +0000 Subject: 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 -- cgit v1.2.3 From c8b2bec86f98f078708871033db55791aa682e35 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 12 Jun 1991 18:27:19 +0000 Subject: 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 -- cgit v1.2.3 From 9a977fa060dfa22e48bed4a7cf97799f85e4ec9e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 12 Jun 1991 18:33:01 +0000 Subject: 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 +