diff --git a/external/bsd/pcc/dist/pcc-libs/Makefile.in b/external/bsd/pcc/dist/pcc-libs/Makefile.in deleted file mode 100644 index 2c4fa97300ee..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/Makefile.in +++ /dev/null @@ -1,24 +0,0 @@ -# Id: Makefile.in,v 1.3 2008/07/18 08:11:28 gmcgarry Exp -# $NetBSD: Makefile.in,v 1.1.1.2 2010/06/03 18:58:00 plunky Exp $ -# -# top-level Makefile -# - -VPATH = @srcdir@ - -SUBDIR = libsoftfloat libpcc csu - -all: $(SUBDIR) - -install clean: - for f in $(SUBDIR); do (cd $$f && $(MAKE) $@); done - -distclean: clean - for f in $(SUBDIR); do (cd $$f && $(MAKE) distclean); done - /bin/rm -rf Makefile config.log config.status \ - configure.lineno config.h autom4te.cache - -$(SUBDIR): nonexistant - cd $@; $(MAKE) all $(MFLAGS) - -nonexistant: diff --git a/external/bsd/pcc/dist/pcc-libs/config.guess b/external/bsd/pcc/dist/pcc-libs/config.guess deleted file mode 100644 index 278f9e9e07c1..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/config.guess +++ /dev/null @@ -1,1516 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. - -timestamp='2007-07-22' - -# 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 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 -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[45]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:[3456]*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T | authenticamd) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - arm*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - xtensa:Linux:*:*) - echo xtensa-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -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` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/external/bsd/pcc/dist/pcc-libs/config.sub b/external/bsd/pcc/dist/pcc-libs/config.sub deleted file mode 100644 index 1761d8bdf630..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/config.sub +++ /dev/null @@ -1,1626 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. - -timestamp='2007-06-28' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# 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 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64vr | mips64vrel \ - | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | score \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa-* \ - | ymp-* \ - | z8k-*) - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/external/bsd/pcc/dist/pcc-libs/configure b/external/bsd/pcc/dist/pcc-libs/configure deleted file mode 100755 index fba5622c0aa4..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/configure +++ /dev/null @@ -1,3384 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for pcc-libs 0.9.9. -# -# Report bugs to <>. -# -# 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='pcc-libs' -PACKAGE_TARNAME='pcc-libs' -PACKAGE_VERSION='0.9.9' -PACKAGE_STRING='pcc-libs 0.9.9' -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 -SET_MAKE -INSTALL_PROGRAM -INSTALL_SCRIPT -INSTALL_DATA -build -build_cpu -build_vendor -build_os -host -host_cpu -host_vendor -host_os -target -target_cpu -target_vendor -target_os -ENDIAN_FLAG -CC -ac_ct_CC -AR -RANLIB -targos -targmach -version -CPPFLAGS -CFLAGS -LIBOBJS -LTLIBOBJS' -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_TARNAME}' -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 pcc-libs 0.9.9 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/pcc-libs] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] - --target=TARGET configure for building compilers for TARGET [HOST] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of pcc-libs 0.9.9:";; - esac - cat <<\_ACEOF - -Report bugs to <>. -_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 -pcc-libs configure 0.9.9 -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 pcc-libs $as_me 0.9.9, 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 - - - -{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } -set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - SET_MAKE= -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 -echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} - { (exit 1); exit 1; }; } -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - done - done - ;; -esac -done -IFS=$as_save_IFS - - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} - { (exit 1); exit 1; }; } - -{ echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6; } -if test "${ac_cv_build+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -echo "$as_me: error: invalid value of canonical build" >&2;} - { (exit 1); exit 1; }; };; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6; } -if test "${ac_cv_host+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} - { (exit 1); exit 1; }; } -fi - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -echo "$as_me: error: invalid value of canonical host" >&2;} - { (exit 1); exit 1; }; };; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -{ echo "$as_me:$LINENO: checking target system type" >&5 -echo $ECHO_N "checking target system type... $ECHO_C" >&6; } -if test "${ac_cv_target+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "x$target_alias" = x; then - ac_cv_target=$ac_cv_host -else - ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} - { (exit 1); exit 1; }; } -fi - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5 -echo "${ECHO_T}$ac_cv_target" >&6; } -case $ac_cv_target in -*-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 -echo "$as_me: error: invalid value of canonical target" >&2;} - { (exit 1); exit 1; }; };; -esac -target=$ac_cv_target -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_target -shift -target_cpu=$1 -target_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -target_os=$* -IFS=$ac_save_IFS -case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac - - -# The aliases save the names the user supplied, while $host etc. -# will get canonicalized. -test -n "$target_alias" && - test "$program_prefix$program_suffix$program_transform_name" = \ - NONENONEs,x,x, && - program_prefix=${target_alias}- - -version=$PACKAGE_VERSION - -case "$target_os" in - - apple) - targos=apple - case "$target_cpu" in - m68k) targmach=m68k endian=big ;; - esac - ;; - - darwin*) - targos=darwin - case "$target_cpu" in - i?86) targmach=i386 ;; - powerpc) targmach=powerpc endian=big ;; - esac - ;; - - dragonfly*) - targos=dragonfly - case "$target_cpu" in - i?86) targmach=i386 ;; - esac - ;; - - freebsd*) - targos=freebsd - case "$target_cpu" in - i386) targmach=i386 ;; - esac - ;; - - linux*) - targos=linux - case "$target_cpu" in - i?86) targmach=i386 ;; - powerpc*) targmach=powerpc endian=big ;; - x86_64) targmach=amd64 ;; - esac - ;; - - midnightbsd*) - targos=midnightbsd - case "$target_cpu" in - i?86) targmach=i386 ;; - sparc64) targmach=sparc64 endian=big ;; - esac - ;; - - minix) - targos=minix - case "$target_cpu" in - m68k) targmach=m68k endian=big ;; - esac - ;; - - mirbsd*) - targos=mirbsd - case "$target_cpu" in - i?86) targmach=i386 ;; - esac - ;; - - netbsd*) - targos=netbsd - case "$target_cpu" in - armeb) targmach=arm endian=big ;; - arm*) targmach=arm ;; - i?86) targmach=i386 ;; - m68k*) targmach=m68k endian=big ;; - mipseb) targmach=mips endian=big ;; - mips*) targmach=mips ;; - pdp10) targmach=pdp10 ;; - powerpc) targmach=powerpc endian=big ;; - sparc64) targmach=sparc64 endian=big ;; - vax) targmach=vax ;; - esac - ;; - - openbsd*) - targos=openbsd - case "$target_cpu" in - i?86) targmach=i386 ;; - vax) targmach=vax ;; - powerpc) targmach=powerpc endian=big ;; - sparc64) targmach=sparc64 endian=big ;; - esac - ;; - - sunos*|solaris*) - targos=sunos - case "$target_cpu" in - i?86) targmach=i386 ;; - sparc*) targmach=sparc64 endian=big ;; - esac - ;; - - windows*|pe*) - target_alias=i386-pe - targos=win32 - targmach=i386 - ;; - - *) - targos="$target_os" - case "$target_cpu" in - m16c) targmach=m16c ;; - nova) targmach=nova ;; - esac - ;; -esac - -if test "X$targos" = X -o "X$targmach" = X; then - { { echo "$as_me:$LINENO: error: '$target' is not (yet) supported by pcc-libs." >&5 -echo "$as_me: error: '$target' is not (yet) supported by pcc-libs." >&2;} - { (exit 1); exit 1; }; } -fi - -if test "X$endian" = "Xbig"; then - ENDIAN_FLAG=-D__BIG_ENDIAN__=1 - -else - ENDIAN_FLAG=-D__LITTLE_ENDIAN__=1 - -fi - -if test -n "$ac_tool_prefix"; then - for ac_prog in pcc gcc cc - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$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_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in pcc gcc cc -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_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; 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_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { echo "$as_me:$LINENO: result: $AR" >&5 -echo "${ECHO_T}$AR" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; 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_ac_ct_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 -echo "${ECHO_T}$ac_ct_AR" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_AR" = x; then - AR="ar" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -else - AR="$ac_cv_prog_AR" -fi - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; 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_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; 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_ac_ct_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - - - - - - - - - - - -ac_config_files="$ac_config_files Makefile csu/Makefile libsoftfloat/Makefile libpcc/Makefile" - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - 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=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { echo "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file - else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -ac_script=' -t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g -t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g -t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` - - -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - -: ${CONFIG_STATUS=./config.status} -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## 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 - - - - 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 6>&1 - -# Save the log message, to keep $[0] and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by pcc-libs $as_me 0.9.9, which was -generated by GNU Autoconf 2.61. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF -# Files that config.status was made for. -config_files="$ac_config_files" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. - -Usage: $0 [OPTIONS] [FILE]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - -Configuration files: -$config_files - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -ac_cs_version="\\ -pcc-libs config.status 0.9.9 -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" - -Copyright (C) 2006 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" - ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; - - *) ac_config_targets="$ac_config_targets $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL - export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "csu/Makefile") CONFIG_FILES="$CONFIG_FILES csu/Makefile" ;; - "libsoftfloat/Makefile") CONFIG_FILES="$CONFIG_FILES libsoftfloat/Makefile" ;; - "libpcc/Makefile") CONFIG_FILES="$CONFIG_FILES libpcc/Makefile" ;; - - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -# -# Set up the sed scripts for CONFIG_FILES section. -# - -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h -if test -n "$CONFIG_FILES"; then - -_ACEOF - - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -SET_MAKE!$SET_MAKE$ac_delim -INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim -INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim -INSTALL_DATA!$INSTALL_DATA$ac_delim -build!$build$ac_delim -build_cpu!$build_cpu$ac_delim -build_vendor!$build_vendor$ac_delim -build_os!$build_os$ac_delim -host!$host$ac_delim -host_cpu!$host_cpu$ac_delim -host_vendor!$host_vendor$ac_delim -host_os!$host_os$ac_delim -target!$target$ac_delim -target_cpu!$target_cpu$ac_delim -target_vendor!$target_vendor$ac_delim -target_os!$target_os$ac_delim -ENDIAN_FLAG!$ENDIAN_FLAG$ac_delim -CC!$CC$ac_delim -ac_ct_CC!$ac_ct_CC$ac_delim -AR!$AR$ac_delim -RANLIB!$RANLIB$ac_delim -targos!$targos$ac_delim -targmach!$targmach$ac_delim -version!$version$ac_delim -CPPFLAGS!$CPPFLAGS$ac_delim -CFLAGS!$CFLAGS$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -LTLIBOBJS!$LTLIBOBJS$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 65; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof -_ACEOF - - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF -fi # test -n "$CONFIG_FILES" - - -for ac_tag in :F $CONFIG_FILES -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; - esac - ac_file_inputs="$ac_file_inputs $ac_f" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - fi - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - 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 - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= - -case `sed -n '/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p -' $ac_file_inputs` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -$ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac - ;; - - - - esac - -done # for ac_tag - - -{ (exit 0); exit 0; } -_ACEOF -chmod +x $CONFIG_STATUS -ac_clean_files=$ac_clean_files_save - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } -fi - diff --git a/external/bsd/pcc/dist/pcc-libs/configure.ac b/external/bsd/pcc/dist/pcc-libs/configure.ac deleted file mode 100644 index 752efc06b300..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/configure.ac +++ /dev/null @@ -1,151 +0,0 @@ -# Process this file with autoconf to produce a configure script. - -AC_PREREQ(2.59) -AC_INIT([pcc-libs], [0.9.9], ) - -AC_PROG_MAKE_SET -AC_PROG_INSTALL -AC_CANONICAL_TARGET - -version=$PACKAGE_VERSION - -case "$target_os" in - - apple) - targos=apple - case "$target_cpu" in - m68k) targmach=m68k endian=big ;; - esac - ;; - - darwin*) - targos=darwin - case "$target_cpu" in - i?86) targmach=i386 ;; - powerpc) targmach=powerpc endian=big ;; - esac - ;; - - dragonfly*) - targos=dragonfly - case "$target_cpu" in - i?86) targmach=i386 ;; - esac - ;; - - freebsd*) - targos=freebsd - case "$target_cpu" in - i386) targmach=i386 ;; - esac - ;; - - linux*) - targos=linux - case "$target_cpu" in - i?86) targmach=i386 ;; - powerpc*) targmach=powerpc endian=big ;; - x86_64) targmach=amd64 ;; - esac - ;; - - midnightbsd*) - targos=midnightbsd - case "$target_cpu" in - i?86) targmach=i386 ;; - sparc64) targmach=sparc64 endian=big ;; - esac - ;; - - minix) - targos=minix - case "$target_cpu" in - m68k) targmach=m68k endian=big ;; - esac - ;; - - mirbsd*) - targos=mirbsd - case "$target_cpu" in - i?86) targmach=i386 ;; - esac - ;; - - netbsd*) - targos=netbsd - case "$target_cpu" in - armeb) targmach=arm endian=big ;; - arm*) targmach=arm ;; - i?86) targmach=i386 ;; - m68k*) targmach=m68k endian=big ;; - mipseb) targmach=mips endian=big ;; - mips*) targmach=mips ;; - pdp10) targmach=pdp10 ;; - powerpc) targmach=powerpc endian=big ;; - sparc64) targmach=sparc64 endian=big ;; - vax) targmach=vax ;; - esac - ;; - - openbsd*) - targos=openbsd - case "$target_cpu" in - i?86) targmach=i386 ;; - vax) targmach=vax ;; - powerpc) targmach=powerpc endian=big ;; - sparc64) targmach=sparc64 endian=big ;; - esac - ;; - - sunos*|solaris*) - targos=sunos - case "$target_cpu" in - i?86) targmach=i386 ;; - sparc*) targmach=sparc64 endian=big ;; - esac - ;; - - windows*|pe*) - target_alias=i386-pe - targos=win32 - targmach=i386 - ;; - - *) - targos="$target_os" - case "$target_cpu" in - m16c) targmach=m16c ;; - nova) targmach=nova ;; - esac - ;; -esac - -if test "X$targos" = X -o "X$targmach" = X; then - AC_MSG_ERROR(['$target' is not (yet) supported by pcc-libs.]) -fi - -if test "X$endian" = "Xbig"; then - AC_SUBST([ENDIAN_FLAG],[-D__BIG_ENDIAN__=1]) -else - AC_SUBST([ENDIAN_FLAG],[-D__LITTLE_ENDIAN__=1]) -fi - -AC_CHECK_TOOLS([CC], [pcc gcc cc]) -AC_CHECK_TOOL([AR], [ar], [ar]) -AC_PROG_RANLIB - -AC_SUBST(targos) -AC_SUBST(targmach) -AC_SUBST(version) -AC_SUBST(prefix) -AC_SUBST(libdir) -AC_SUBST(includedir) -AC_SUBST(CPPFLAGS) -AC_SUBST(CFLAGS) - -AC_CONFIG_FILES([Makefile - csu/Makefile - libsoftfloat/Makefile - libpcc/Makefile -]) -AC_OUTPUT diff --git a/external/bsd/pcc/dist/pcc-libs/csu/Makefile.in b/external/bsd/pcc/dist/pcc-libs/csu/Makefile.in deleted file mode 100644 index ae29e5496816..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/csu/Makefile.in +++ /dev/null @@ -1,27 +0,0 @@ -# Id: Makefile.in,v 1.9 2009/09/20 00:50:58 gmcgarry Exp -# $NetBSD: Makefile.in,v 1.1.1.3 2010/06/03 18:58:04 plunky Exp $ -# -# top-level Makefile -# - -prefix = @prefix@ -exec_prefix = @exec_prefix@ -libdir = @libdir@ -srcdir = @srcdir@ - -TARGOS = @targos@ -TARGMACH = @targmach@ -TARGET = @target@ -VERSION = @version@ -PCCLIBDIR = $(libdir)/pcc/$(TARGET)/$(VERSION)/lib - -CC = @CC@ -CFLAGS = @CFLAGS@ - -MFLAGS += CC=$(CC) MACH=$(TARGMACH) PCCLIBDIR=$(PCCLIBDIR) VPATH=$(srcdir)/$(TARGOS) SRCDIR=$(srcdir)/$(TARGOS)/ - -all clean install: - if test -f $(srcdir)/$(TARGOS)/Makefile ; then $(MAKE) -f $(srcdir)/$(TARGOS)/Makefile $(MFLAGS) $@ ; fi - -distclean: clean - /bin/rm -f Makefile diff --git a/external/bsd/pcc/dist/pcc-libs/csu/README b/external/bsd/pcc/dist/pcc-libs/csu/README deleted file mode 100644 index 762dfe2e4ac9..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/csu/README +++ /dev/null @@ -1,19 +0,0 @@ -Id: README,v 1.4 2009/08/14 02:17:08 gmcgarry Exp -$NetBSD: README,v 1.1.1.3 2010/06/03 18:58:04 plunky Exp $ - -OS-dependent and target-dependent: - -crt0.o startup code for programs (maybe compiled -static) -crt1.o startup code for programs compiled -dynamic (if necessary) -gcrt1.o profiling startup code for programs (maybe compiled -dynamic) -crti.o beginning of _init() and _fini() functions (inside .init section) -crtn.o end of _init() and _fini() functions (inside .fini section) - -OS-dependent, but target-independent: - -crtbegin.o support for calling global ctors/dtors -crtend.o end of the ctor/dtor lists -crtbeginT.o + for static binary (if necessary) -crtendT.o + for static binary (if necessary) -crtbeginS.o + for shared library (if necessary) -crtendS.o + for shared library (if necessary) diff --git a/external/bsd/pcc/dist/pcc-libs/csu/darwin/Makefile b/external/bsd/pcc/dist/pcc-libs/csu/darwin/Makefile deleted file mode 100644 index c5e2fa21b0f9..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/csu/darwin/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -MACH ?= powerpc -TARGET ?= $(MACH)-darwin -VERSION ?= 0.9.9 -PCCLIBDIR ?= /usr/local/lib/pcc/$(TARGET)/$(VERSION)/lib -SRCDIR ?= . - -CFLAGS = -I$(SRCDIR)$(MACH) -I$(SRCDIR) -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes - -OBJS = crt0.o crt1.o gcrt1.o dylib1.o - -all: $(OBJS) - -crt0.o: $(MACH)/crt0.c - $(CC) -r -static -nostdlib -Wl,-keep_private_externs -Wl,-weak_reference_mismatches,non-weak -DCRT -O $(CFLAGS) -o $@ $< - -crt1.o: $(MACH)/crt0.c - $(CC) -r -nostdlib -Wl,-keep_private_externs -Wl,-weak_reference_mismatches,non-weak -DCRT -DDYNAMIC -O $(CFLAGS) -o $@ $< /usr/lib/dyld - -gcrt1.o: $(MACH)/crt0.c - $(CC) -r -nostdlib -Wl,-keep_private_externs -Wl,-weak_reference_mismatches,non-weak -DCRT -DDYNAMIC -DPROFILE -O $(CFLAGS) -o $@ $< /usr/lib/dyld - -dylib1.o: $(MACH)/dylib1.c - $(CC) -r -nostdlib -Wl,-keep_private_externs -Wl,-weak_reference_mismatches,non-weak -DDYNAMIC -O $(CFLAGS) -o $@ $< - -install: - mkdir -p ${DESTDIR}$(PCCLIBDIR) - cp $(OBJS) ${DESTDIR}$(PCCLIBDIR) - -clean: - rm -f $(OBJS) diff --git a/external/bsd/pcc/dist/pcc-libs/csu/darwin/common.c b/external/bsd/pcc/dist/pcc-libs/csu/darwin/common.c deleted file mode 100644 index 3af4da3b9213..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/csu/darwin/common.c +++ /dev/null @@ -1,122 +0,0 @@ -/* Id: common.c,v 1.3 2008/07/02 00:18:18 gmcgarry Exp */ -/* $NetBSD: common.c,v 1.1.1.2 2010/06/03 18:58:04 plunky Exp $ */ -/*- - * Copyright (c) 2008 Gregory McGarry - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "macho.h" - -static char * -_strrchr(char *p, int ch) -{ - char *save; - - for (save = NULL;; ++p) { - if (*p == ch) - save = (char *)p; - if (!*p) - return(save); - } - /* NOTREACHED */ -} - -static int -_strcmp(char *s1, char *s2) -{ - while (*s1 == *s2++) - if (*s1++ == 0) - return 0; - s2--; - return ((long)*s1 - (long)*s2); -} - -#ifdef PROFILE -static void -_mcleanup(void) -{ - monitor(0, 0, 0, 0, 0); -} -#endif - -extern struct mach_header _mh_execute_header; - -static void -_helper(int init) -{ - struct mach_header *hdr = &_mh_execute_header; - char *ptr = (char *)(hdr + 1); - int i, j, n; - struct segment_command *segp; - struct section *secp; - void (*func)(void); - void **addr; - - for (i = 0; i < (int)hdr->ncmds; i++, ptr += segp->cmdsize) { - segp = (struct segment_command *)ptr; - if (segp->cmd != LC_SEGMENT || segp->nsects == 0) - continue; - secp = (struct section *)(segp + 1); - for (j = 0; j < (int)segp->nsects; j++, secp++) { - if (init && _strcmp(secp->sectname, "__constructor") != 0) - continue; - if (!init && _strcmp(secp->sectname, "__destructor") != 0) - continue; - n = secp->size / 4; - addr = (void **)secp->addr; - while (n--) { - func = *addr++; - (*func)(); - } - } - } -} - -void -_init(void) -{ - _helper(1); -} - -void -_fini(void) -{ - _helper(0); -} - -#ifdef DYNAMIC - -void -_dyld_init(void) -{ - void (*init)(void); - _dyld_func_lookup("__dyld_make_delayed_module_initializer_calls", - (void *)&init); - if (init) - init(); -} - -void -_dyld_fini(void) -{ - void (*term)(void); - _dyld_func_lookup("__dyld_mod_term_funcs", (void *)&term); - if (term) - term(); -} - -#endif - -IDENT("Id: common.c,v 1.3 2008/07/02 00:18:18 gmcgarry Exp "); -IDENT("$NetBSD: common.c,v 1.1.1.2 2010/06/03 18:58:04 plunky Exp $"); diff --git a/external/bsd/pcc/dist/pcc-libs/csu/darwin/common.h b/external/bsd/pcc/dist/pcc-libs/csu/darwin/common.h deleted file mode 100644 index ab739eba56e5..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/csu/darwin/common.h +++ /dev/null @@ -1,52 +0,0 @@ -/* Id: common.h,v 1.4 2009/02/14 11:40:28 gmcgarry Exp */ -/* $NetBSD: common.h,v 1.1.1.3 2010/06/03 18:58:04 plunky Exp $ */ -/*- - * Copyright (c) 2008 Gregory McGarry - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#if defined(__ppc__) -#define IDENT(x) asm(".cstring\n\t.ascii \"" x "\\0\"") -#elif defined(__i386__) -#define IDENT(x) asm(".cstring\n\t.ascii \"" x "\\0\"") -#endif - -#define NULL (void *)0 - -extern int main(int argc, char *argv[], char *envp[]); -extern void exit(int); -extern int atexit(void (*fcn)(void)); - -#ifdef CRT -static char *_strrchr(char *, int); -static int _strcmp(char *, char *); -#endif - -#if PROFILE -extern void moninit(void); -static void _mcleanup(void); -extern void monitor(char *, char *, char *, int, int); -#endif - -#ifdef DYNAMIC -extern void _dyld_init(void); -extern void _dyld_fini(void); -extern int _dyld_func_lookup(const char *, void **); -#endif - -extern int (*mach_init_routine)(void); -extern int (*_cthread_init_routine)(void); - -extern void _init(void); -extern void _fini(void); diff --git a/external/bsd/pcc/dist/pcc-libs/csu/darwin/i386/crt0.c b/external/bsd/pcc/dist/pcc-libs/csu/darwin/i386/crt0.c deleted file mode 100644 index fc41f949b3c7..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/csu/darwin/i386/crt0.c +++ /dev/null @@ -1,154 +0,0 @@ -/* Id: crt0.c,v 1.4 2009/02/14 21:02:58 gmcgarry Exp */ -/* $NetBSD: crt0.c,v 1.1.1.3 2010/06/03 18:58:04 plunky Exp $ */ -/*- - * Copyright (c) 2008 Gregory McGarry - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "common.h" - -void _start(int, char **, char **); - -char **environ; -char *__progname = ""; -int NXArgc; -char **NXArgv; - -asm( -#ifdef DYNAMIC - " .text\n" - " .symbol_stub\n" - " .picsymbol_stub\n" -#endif - " .text\n" - " .globl start\n" - " .globl _start\n" - " .p2align 2\n" - "start:\n" - "_start:\n" - " pushl $0\n" - " movl %esp,%ebp\n" - " subl $16,%esp\n" - " andl $-16,%esp\n" - " movl 4(%ebp),%ebx\n" - " movl %ebx,(%esp)\n" - " leal 8(%ebp),%ecx\n" - " movl %ecx,4(%esp)\n" - " addl $1,%ebx\n" - " shll $2,%ebx\n" - " addl %ecx,%ebx\n" - " movl %ebx,8(%esp)\n" - " call __start\n" - " hlt\n" -); - - -void -_start(int argc, char *argv[], char *envp[]) -{ - char *namep; - - environ = envp; - NXArgc = argc; - NXArgv = argv; - - if ((namep = argv[0]) != NULL) { - if ((__progname = _strrchr(namep, '/')) == NULL) - __progname = namep; - else - __progname++; - } - - /* - * Initialise hooks inside libc - */ - if (mach_init_routine) - (*mach_init_routine)(); - if (_cthread_init_routine) - (*_cthread_init_routine)(); - -#ifdef PROFILE - atexit(_mcleanup); - moninit(); -#endif - - atexit(_fini); - _init(); - - exit(main(argc, argv, environ)); -} - - -#ifdef DYNAMIC - -/* - * dylib constructors/destructors - */ -asm( - " .constructor\n" - " .p2align 2\n" - " .long __dyld_init\n" - " .destructor\n" - " .p2align 2\n" - " .long __dyld_fini\n" -); - -/* - * void _dyld_func_lookup(const char *, void **); - * - * jump to the linker via the pointer in the __dyld section - */ -asm( - " .text\n" - " .private_extern __dyld_func_lookup\n" - "__dyld_func_lookup:\n" - " jmp *Ldyld_func_lookup\n" -); - -/* - * void dyld_stub_binding_helper(void) - */ -asm( - " .text\n" - " .private_extern dyld_stub_binding_helper\n" - "dyld_stub_binding_helper:\n" - " pushl $__mh_execute_header\n" - " jmp *Ldyld_lazy_binder\n" -); - -/* - * __dyld section - */ -asm( - " .dyld\n" - " .p2align 2\n" - "Ldyld_lazy_binder:\n" - " .long 0x8fe01000\n" - "Ldyld_func_lookup:\n" - " .long 0x8fe01008\n" - " .long __mh_execute_header\n" - " .long _NXArgc\n" - " .long _NXArgv\n" - " .long _environ\n" - " .long ___progname\n" -); - -#endif - -asm("\t.subsections_via_symbols\n"); - -#include "common.c" - -IDENT("Id: crt0.c,v 1.4 2009/02/14 21:02:58 gmcgarry Exp "); -IDENT("$NetBSD: crt0.c,v 1.1.1.3 2010/06/03 18:58:04 plunky Exp $"); diff --git a/external/bsd/pcc/dist/pcc-libs/csu/darwin/i386/dylib1.c b/external/bsd/pcc/dist/pcc-libs/csu/darwin/i386/dylib1.c deleted file mode 100644 index 59d104f91fbe..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/csu/darwin/i386/dylib1.c +++ /dev/null @@ -1,72 +0,0 @@ -/* Id: dylib1.c,v 1.1 2009/02/14 11:40:28 gmcgarry Exp */ -/* $NetBSD: dylib1.c,v 1.1.1.2 2010/06/03 18:58:04 plunky Exp $ */ -/*- - * Copyright (c) 2009 Gregory McGarry - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "common.h" - -/* - * void _dyld_func_lookup(const char *, void **); - * - * jump to the linker via the pointer in the __dyld section - */ -asm( - " .text\n" - " .private_extern __dyld_func_lookup\n" - "__dyld_func_lookup:\n" - " call L__dyld_func_lookup$pb\n" - "L__dyld_func_lookup$pb:\n" - " popl %eax\n" - " movl Ldyld_func_lookup-L__dyld_func_lookup$pb(%eax),%eax\n" - " jmp *%eax\n" -); - -/* - * void dyld_stub_binding_helper(void) - */ -asm( - " .data\n" - " .p2align 2\n" - "dyld__mach_header:\n" - " .long __mh_dylib_header\n" - " .text\n" - " .private_extern dyld_stub_binding_helper\n" - " .p2align 2\n" - "dyld_stub_binding_helper:\n" - " call Ldyld_stub_binding_helper$pb\n" - "Ldyld_stub_binding_helper$pb:\n" - " popl %eax\n" - " pushl dyld__mach_header-Ldyld_stub_binding_helper$pb(%eax)\n" - " movl Ldyld_lazy_binder-Ldyld_stub_binding_helper$pb(%eax),%eax\n" - " jmp *%eax\n" -); - -/* - * __dyld section - */ -asm( - " .dyld\n" - " .p2align 2\n" - "Ldyld_lazy_binder:\n" - " .long 0x8fe01000\n" - "Ldyld_func_lookup:\n" - " .long 0x8fe01008\n" -); - -asm("\t.subsections_via_symbols\n"); - -IDENT("Id: dylib1.c,v 1.1 2009/02/14 11:40:28 gmcgarry Exp "); -IDENT("$NetBSD: dylib1.c,v 1.1.1.2 2010/06/03 18:58:04 plunky Exp $"); diff --git a/external/bsd/pcc/dist/pcc-libs/csu/darwin/macho.h b/external/bsd/pcc/dist/pcc-libs/csu/darwin/macho.h deleted file mode 100644 index f14cb7a509e7..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/csu/darwin/macho.h +++ /dev/null @@ -1,59 +0,0 @@ -/* Id: macho.h,v 1.1 2008/06/01 01:28:34 gmcgarry Exp */ -/* $NetBSD: macho.h,v 1.1.1.2 2010/06/03 18:58:04 plunky Exp $ */ -/*- - * Copyright (c) 2008 Gregory McGarry - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include - -struct mach_header { - uint32_t magic; - uint32_t cputype; - uint32_t cpusubtype; - uint32_t filetype; - uint32_t ncmds; - uint32_t sizeofcmds; - uint32_t flags; -}; - -#define LC_SEGMENT 0x01 - -struct segment_command { - uint32_t cmd; - uint32_t cmdsize; - char segname[16]; - uint32_t vmaddr; - uint32_t vmsize; - uint32_t fileoff; - uint32_t filesize; - uint32_t maxprot; - uint32_t initprot; - uint32_t nsects; - uint32_t flags; -}; - -struct section { - char sectname[16]; - char segname[16]; - uint32_t addr; - uint32_t size; - uint32_t offset; - uint32_t align; - uint32_t reloff; - uint32_t nreloc; - uint32_t flags; - uint32_t reserved1; - uint32_t reserved2; -}; diff --git a/external/bsd/pcc/dist/pcc-libs/csu/darwin/powerpc/crt0.c b/external/bsd/pcc/dist/pcc-libs/csu/darwin/powerpc/crt0.c deleted file mode 100644 index 2c43e74524e1..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/csu/darwin/powerpc/crt0.c +++ /dev/null @@ -1,162 +0,0 @@ -/* Id: crt0.c,v 1.5 2009/02/14 21:02:58 gmcgarry Exp */ -/* $NetBSD: crt0.c,v 1.1.1.3 2010/06/03 18:58:04 plunky Exp $ */ -/*- - * Copyright (c) 2008 Gregory McGarry - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "common.h" - -void _start(int, char **, char **); - -char **environ; -char *__progname = ""; -int NXArgc; -char **NXArgv; - -asm( -#ifdef DYNAMIC - " .text\n" - " .symbol_stub\n" - " .picsymbol_stub\n" -#endif - " .text\n" - " .globl start\n" - " .globl _start\n" - " .p2align 2\n" - "start:\n" - "_start:\n" - " mr r26,r1\n" - " subi r1,r1,4\n" - " clrrwi r1,r1,5\n" - " li r0,0\n" - " stw r0,0(r1)\n" - " stwu r1,-64(r1)\n" - " lwz r3,0(r26)\n" - " addi r4,r26,4\n" - " addi r27,r3,1\n" - " slwi r27,r27,2\n" - " add r5,r4,r27\n" - " bl __start\n" - " trap\n" -); - - -void -_start(int argc, char *argv[], char *envp[]) -{ - char *namep; - - environ = envp; - NXArgc = argc; - NXArgv = argv; - - if ((namep = argv[0]) != NULL) { - if ((__progname = _strrchr(namep, '/')) == NULL) - __progname = namep; - else - __progname++; - } - - /* - * Initialise hooks inside libc - */ - if (mach_init_routine) - (*mach_init_routine)(); - if (_cthread_init_routine) - (*_cthread_init_routine)(); - -#ifdef PROFILE - atexit(_mcleanup); - moninit(); -#endif - - atexit(_fini); - _init(); - - exit(main(argc, argv, environ)); -} - - -#ifdef DYNAMIC - -/* - * dylib constructors/destructors - */ -asm( - " .constructor\n" - " .p2align 2\n" - " .long __dyld_init\n" - " .destructor\n" - " .p2align 2\n" - " .long __dyld_fini\n" -); - -/* - * void _dyld_func_lookup(const char *, void **); - * - * jump to the linker via the pointer in the __dyld section - */ -asm( - " .text\n" - " .p2align 2\n" - " .private_extern __dyld_func_lookup\n" - "__dyld_func_lookup:\n" - " lis r11,ha16(Ldyld_func_lookup)\n" - " lwz r11,lo16(Ldyld_func_lookup)(r11)\n" - " mtctr r11\n" - " bctr\n" -); - -/* - * void dyld_stub_binding_helper(void) - */ -asm( - " .text\n" - " .p2align 2\n" - " .private_extern dyld_stub_binding_helper\n" - "dyld_stub_binding_helper:\n" - " lis r12,ha16(Ldyld_lazy_binder)\n" - " lwz r12,lo16(Ldyld_lazy_binder)(r12)\n" - " mtctr r12\n" - " lis r12,ha16(__mh_execute_header)\n" - " addi r12,r12,lo16(__mh_execute_header)\n" - " bctr\n" -); - -/* - * __dyld section - */ -asm( - " .dyld\n" - " .p2align 2\n" - "Ldyld_lazy_binder:\n" - " .long 0x8fe01000\n" - "Ldyld_func_lookup:\n" - " .long 0x8fe01008\n" - " .long __mh_execute_header\n" - " .long _NXArgc\n" - " .long _NXArgv\n" - " .long _environ\n" - " .long ___progname\n" -); - -#endif - -asm("\t.subsections_via_symbols\n"); - -#include "common.c" - -IDENT("Id: crt0.c,v 1.5 2009/02/14 21:02:58 gmcgarry Exp "); -IDENT("$NetBSD: crt0.c,v 1.1.1.3 2010/06/03 18:58:04 plunky Exp $"); diff --git a/external/bsd/pcc/dist/pcc-libs/csu/darwin/powerpc/dylib1.c b/external/bsd/pcc/dist/pcc-libs/csu/darwin/powerpc/dylib1.c deleted file mode 100644 index 12c527a9080c..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/csu/darwin/powerpc/dylib1.c +++ /dev/null @@ -1,90 +0,0 @@ -/* Id: dylib1.c,v 1.1 2009/02/14 11:40:28 gmcgarry Exp */ -/* $NetBSD: dylib1.c,v 1.1.1.2 2010/06/03 18:58:04 plunky Exp $ */ -/*- - * Copyright (c) 2009 Gregory McGarry - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "common.h" - -asm( - " .text\n" - " .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32" -); - -/* - * void _dyld_func_lookup(const char *, void **); - * - * jump to the linker via the pointer in the __dyld section - */ -asm( - " .text\n" - " .p2align 2\n" - " .private_extern __dyld_func_lookup\n" - "__dyld_func_lookup:\n" - " mflr r0\n" - " bcl 20,31,L__dyld_func_lookup$pb\n" - "L__dyld_func_lookup$pb:\n" - " mflr r11\n" - " mtlr r0\n" - " addis r11,r11,ha16(Ldyld_func_lookup-L__dyld_func_lookup$pb)\n" - " lwz r11,lo16(Ldyld_func_lookup-L__dyld_func_lookup$pb)(r11)\n" - " mtctr r11\n" - " bctr\n" -); - -/* - * void dyld_stub_binding_helper(void) - */ -asm( - " .data\n" - " .p2align 2\n" - "dyld__mach_header:\n" - " .long __mh_dylib_header\n" - " .text\n" - " .p2align 2\n" - " .private_extern dyld_stub_binding_helper\n" - "dyld_stub_binding_helper:\n" - " mflr r0\n" - " bcl 20,31,Ldyld_stub_binding_helper$pb\n" - "Ldyld_stub_binding_helper$pb:\n" - " mflr r12\n" - " mtlr r0\n" - " mr r0,r12\n" - " addis r12,r12,ha16(Ldyld_lazy_binder-Ldyld_stub_binding_helper$pb)\n" - " lwz r12,lo16(Ldyld_lazy_binder-Ldyld_stub_binding_helper$pb)(r12)\n" - " mtctr r12\n" - " mr r12,r0\n" - " addis r12,r12,ha16(dyld__mach_header-Ldyld_stub_binding_helper$pb)\n" - " lwz r12,lo16(dyld__mach_header-Ldyld_stub_binding_helper$pb)(r12)\n" - " bctr\n" -); - -/* - * __dyld section - */ -asm( - " .dyld\n" - " .p2align 2\n" - "Ldyld_lazy_binder:\n" - " .long 0x8fe01000\n" - "Ldyld_func_lookup:\n" - " .long 0x8fe01008\n" - -); - -asm("\t.subsections_via_symbols\n"); - -IDENT("Id: dylib1.c,v 1.1 2009/02/14 11:40:28 gmcgarry Exp "); -IDENT("$NetBSD: dylib1.c,v 1.1.1.2 2010/06/03 18:58:04 plunky Exp $"); diff --git a/external/bsd/pcc/dist/pcc-libs/csu/linux/Makefile b/external/bsd/pcc/dist/pcc-libs/csu/linux/Makefile deleted file mode 100644 index fdc6c16fa1ba..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/csu/linux/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -MACH ?= i386 -TARGET ?= $(MACH)-linux -VERSION ?= 0.9.9 -PCCLIBDIR ?= /usr/local/lib/pcc/$(TARGET)/$(VERSION)/lib -SRCDIR ?= . - -CFLAGS = -I$(SRCDIR)/$(MACH) -I$(SRCDIR) -Wall -Wstrict-prototypes -Wmissing-prototypes - -OBJS = crt0.o crt1.o gcrt1.o crti.o crtn.o crtbegin.o crtend.o - -all: $(OBJS) - -crt0.o: $(MACH)/crt0.c - $(CC) -O $(CFLAGS) -c -o $@ $< - -crt1.o: $(MACH)/crt0.c - $(CC) -O $(CFLAGS) -c -o $@ $< - -gcrt1.o: $(MACH)/crt0.c - $(CC) -O -DPROFILE $(CFLAGS) -c -o $@ $< - -crti.o: $(MACH)/crti.c - $(CC) -O $(CFLAGS) -c -o $@ $< - -crtn.o: $(MACH)/crtn.c - $(CC) -O $(CFLAGS) -c -o $@ $< - -crtbegin.o: crtbegin.c - $(CC) -O $(CFLAGS) -c -o $@ $< - -crtend.o: crtend.c - $(CC) -O $(CFLAGS) -c -o $@ $< - -install: - mkdir -p ${DESTDIR}$(PCCLIBDIR) - cp $(OBJS) ${DESTDIR}$(PCCLIBDIR) - -clean: - rm -f $(OBJS) diff --git a/external/bsd/pcc/dist/pcc-libs/csu/linux/amd64/crt0.c b/external/bsd/pcc/dist/pcc-libs/csu/linux/amd64/crt0.c deleted file mode 100644 index eb6024d798cd..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/csu/linux/amd64/crt0.c +++ /dev/null @@ -1,55 +0,0 @@ -/* Id: crt0.c,v 1.1 2009/08/14 02:24:36 gmcgarry Exp */ -/* $NetBSD: crt0.c,v 1.1.1.2 2010/06/03 18:58:04 plunky Exp $ */ -/*- - * Copyright (c) 2009 Gregory McGarry - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "common.h" - -void __start(int, char **, char **); - -asm(" .text \n" -" .align 4 \n" -" .globl _start \n" -"_start: \n" -" movq %rbx,%r9 \n" -" movq %rcx,%r8 \n" -" movq %rdx,%rcx \n" -" movq (%rsp),%rdi \n" -" leaq 16(%rsp,%rdi,8),%rdx \n" -" leaq 8(%rsp),%rsi \n" -" subq $16,%rsp \n" -" andq $-16,%rsp \n" -" jmp __start \n"); - -void -__start(int argc, char *argv[], char *envp[]) -{ - -#ifdef PROFILE - atexit(_mcleanup); - monstartup((unsigned long)&_eprol, (unsigned long)&_etext); -#endif - - _init(); - atexit(_fini); - - exit(main(argc, argv, envp)); -} - -#include "common.c" - -IDENT("Id: crt0.c,v 1.1 2009/08/14 02:24:36 gmcgarry Exp "); -IDENT("$NetBSD: crt0.c,v 1.1.1.2 2010/06/03 18:58:04 plunky Exp $"); diff --git a/external/bsd/pcc/dist/pcc-libs/csu/linux/amd64/crti.c b/external/bsd/pcc/dist/pcc-libs/csu/linux/amd64/crti.c deleted file mode 100644 index 6c06b265e391..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/csu/linux/amd64/crti.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Id: crti.c,v 1.1 2009/08/14 02:24:36 gmcgarry Exp */ -/* $NetBSD: crti.c,v 1.1.1.2 2010/06/03 18:58:05 plunky Exp $ */ -/*- - * Copyright (c) 2009 Gregory McGarry - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "common.h" - -asm( " .section .init \n" - " .globl _init \n" - " .align 16 \n" - "_init: \n" - " subq $8,%rsp \n" - " .previous \n"); - -asm( " .section .fini \n" - " .globl _fini \n" - " .align 16 \n" - "_fini: \n" - " subq $8,%rsp \n" - " .previous \n"); - -IDENT("Id: crti.c,v 1.1 2009/08/14 02:24:36 gmcgarry Exp "); -IDENT("$NetBSD: crti.c,v 1.1.1.2 2010/06/03 18:58:05 plunky Exp $"); diff --git a/external/bsd/pcc/dist/pcc-libs/csu/linux/amd64/crtn.c b/external/bsd/pcc/dist/pcc-libs/csu/linux/amd64/crtn.c deleted file mode 100644 index 4671ddce4f10..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/csu/linux/amd64/crtn.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Id: crtn.c,v 1.1 2009/08/14 02:24:36 gmcgarry Exp */ -/* $NetBSD: crtn.c,v 1.1.1.2 2010/06/03 18:58:05 plunky Exp $ */ -/*- - * Copyright (c) 2009 Gregory McGarry - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "common.h" - -asm( " .section .init \n" - " addq $8,%rsp \n" - " ret \n" - " .previous \n"); - -asm( " .section .fini \n" - " addq $8,%rsp \n" - " ret \n" - " .previous \n"); - -IDENT("Id: crtn.c,v 1.1 2009/08/14 02:24:36 gmcgarry Exp "); -IDENT("$NetBSD: crtn.c,v 1.1.1.2 2010/06/03 18:58:05 plunky Exp $"); diff --git a/external/bsd/pcc/dist/pcc-libs/csu/linux/common.c b/external/bsd/pcc/dist/pcc-libs/csu/linux/common.c deleted file mode 100644 index e873a17b7a33..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/csu/linux/common.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Id: common.c,v 1.4 2009/01/23 07:10:09 gmcgarry Exp */ -/* $NetBSD: common.c,v 1.1.1.3 2010/06/03 18:58:04 plunky Exp $ */ -/*- - * Copyright (c) 2008 Gregory McGarry - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "common.h" - -#ifdef PROFILE -asm(" .text\n_eprol:"); -#endif - -IDENT("Id: common.c,v 1.4 2009/01/23 07:10:09 gmcgarry Exp "); -IDENT("$NetBSD: common.c,v 1.1.1.3 2010/06/03 18:58:04 plunky Exp $"); diff --git a/external/bsd/pcc/dist/pcc-libs/csu/linux/common.h b/external/bsd/pcc/dist/pcc-libs/csu/linux/common.h deleted file mode 100644 index 2a3cc8cb486f..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/csu/linux/common.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Id: common.h,v 1.5 2009/02/14 23:49:40 gmcgarry Exp */ -/* $NetBSD: common.h,v 1.1.1.3 2010/06/03 18:58:04 plunky Exp $ */ -/*- - * Copyright (c) 2008 Gregory McGarry - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#define IDENT(x) asm(".ident\t\"" x "\"") - -#define NULL (void *)0 - -extern int main(int argc, char *argv[], char *envp[]); -extern void exit(int); -extern int atexit(void (*fcn)(void)); - -#if PROFILE -extern void monstartup(unsigned long, unsigned long); -extern void _mcleanup(void); -extern unsigned char _etext, _eprol; -#endif - -extern void _init(void); -extern void _fini(void); diff --git a/external/bsd/pcc/dist/pcc-libs/csu/linux/crtbegin.c b/external/bsd/pcc/dist/pcc-libs/csu/linux/crtbegin.c deleted file mode 100644 index 7edc1db79116..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/csu/linux/crtbegin.c +++ /dev/null @@ -1,125 +0,0 @@ -/* Id: crtbegin.c,v 1.6 2009/08/16 23:07:07 gmcgarry Exp */ -/* $NetBSD: crtbegin.c,v 1.1.1.3 2010/06/03 18:58:04 plunky Exp $ */ -/*- - * Copyright (c) 1998, 2001, 2002 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Paul Kranenburg, Ross Harvey, and Jason R. Thorpe. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR 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 FOUNDATION 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. - */ - -/* - * Run-time module which handles constructors and destructors. - */ - -#include "common.h" - -void __do_global_ctors_aux(void); -void __do_global_dtors_aux(void); - -extern void (*__CTOR_LIST__[1])(void); -extern void (*__DTOR_LIST__[1])(void); - -asm( " .section .ctors\n" - " .align 2\n" - "__CTOR_LIST__:\n" -#ifdef __x86_64__ - " .quad -1\n" -#else - " .long -1\n" -#endif - " .section .dtors\n" - " .align 2\n" - "__DTOR_LIST__:\n" -#ifdef __x86_64__ - " .quad -1\n" -#else - " .long -1\n" -#endif -); - - -static void -__ctors(void) -{ - unsigned long i = (unsigned long) __CTOR_LIST__[0]; - void (**p)(void); - - if (i == (unsigned long) -1) { - for (i = 1; __CTOR_LIST__[i]; i++) - ; - i--; - } - p = __CTOR_LIST__ + i; - while (i--) - (**p--)(); -} - -static void -__dtors(void) -{ - void (**p)(void) = __DTOR_LIST__ + 1; - - while (*p) - (**p++)(); -} - -void -__do_global_ctors_aux(void) -{ - static int initialized; - - if (!initialized) { - initialized = 1; - __ctors(); - } -} - -void -__do_global_dtors_aux(void) -{ - static int finished; - - if (finished) - return; - - __dtors(); - - finished = 1; -} - -#define MD_CALL_STATIC_FUNCTION(section, func) \ -void __call_##func(void); \ -void __call_##func(void) \ -{ \ - asm volatile (".section " #section); \ - func(); \ - asm volatile (".previous"); \ -} - -MD_CALL_STATIC_FUNCTION(.init, __do_global_ctors_aux) -MD_CALL_STATIC_FUNCTION(.fini, __do_global_dtors_aux) - -IDENT("Id: crtbegin.c,v 1.6 2009/08/16 23:07:07 gmcgarry Exp "); -IDENT("$NetBSD: crtbegin.c,v 1.1.1.3 2010/06/03 18:58:04 plunky Exp $"); diff --git a/external/bsd/pcc/dist/pcc-libs/csu/linux/crtend.c b/external/bsd/pcc/dist/pcc-libs/csu/linux/crtend.c deleted file mode 100644 index 0930b08b3f70..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/csu/linux/crtend.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Id: crtend.c,v 1.3 2009/08/16 23:07:07 gmcgarry Exp */ -/* $NetBSD: crtend.c,v 1.1.1.3 2010/06/03 18:58:04 plunky Exp $ */ -/*- - * Copyright (c) 2008 Gregory McGarry - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "common.h" - -asm( " .section .ctors\n" -#ifdef __x86_64__ - " .quad 0\n" -#else - " .long 0\n" -#endif -); - -asm( " .section .dtors\n" -#ifdef __x86_64__ - " .quad 0\n" -#else - " .long 0\n" -#endif -); - -IDENT("Id: crtend.c,v 1.3 2009/08/16 23:07:07 gmcgarry Exp "); -IDENT("$NetBSD: crtend.c,v 1.1.1.3 2010/06/03 18:58:04 plunky Exp $"); diff --git a/external/bsd/pcc/dist/pcc-libs/csu/linux/i386/crt0.c b/external/bsd/pcc/dist/pcc-libs/csu/linux/i386/crt0.c deleted file mode 100644 index bd4d9b7533e7..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/csu/linux/i386/crt0.c +++ /dev/null @@ -1,59 +0,0 @@ -/* Id: crt0.c,v 1.4 2009/02/14 23:49:40 gmcgarry Exp */ -/* $NetBSD: crt0.c,v 1.1.1.3 2010/06/03 18:58:05 plunky Exp $ */ -/*- - * Copyright (c) 2008 Gregory McGarry - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "common.h" - -void __start(int, char **, char **); - -asm(" .text \n" -" .align 4 \n" -" .globl _start \n" -"_start: \n" -" xorl %ebp,%ebp \n" -" popl %ebx \n" -" movl %esp,%ecx \n" -" subl $16,%esp \n" -" andl $-16,%esp \n" -" movl %ebx,(%esp) \n" -" movl %ecx,4(%esp) \n" -" addl $1,%ebx \n" -" shll $2,%ebx \n" -" addl %ebx,%ecx \n" -" movl %ecx,8(%esp) \n" -" call __start \n" -" hlt \n"); - -void -__start(int argc, char *argv[], char *envp[]) -{ - -#ifdef PROFILE - atexit(_mcleanup); - monstartup((unsigned long)&_eprol, (unsigned long)&_etext); -#endif - - _init(); - atexit(_fini); - - exit(main(argc, argv, envp)); -} - -#include "common.c" - -IDENT("Id: crt0.c,v 1.4 2009/02/14 23:49:40 gmcgarry Exp "); -IDENT("$NetBSD: crt0.c,v 1.1.1.3 2010/06/03 18:58:05 plunky Exp $"); diff --git a/external/bsd/pcc/dist/pcc-libs/csu/linux/i386/crti.c b/external/bsd/pcc/dist/pcc-libs/csu/linux/i386/crti.c deleted file mode 100644 index 18dccff9e4c4..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/csu/linux/i386/crti.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Id: crti.c,v 1.2 2008/07/02 00:19:20 gmcgarry Exp */ -/* $NetBSD: crti.c,v 1.1.1.2 2010/06/03 18:58:05 plunky Exp $ */ -/*- - * Copyright (c) 2008 Gregory McGarry - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "common.h" - -asm( " .section .init \n" - " .globl _init \n" - " .align 16 \n" - "_init: \n" - " push %ebp \n" - " mov %esp,%ebp \n" - " .previous \n"); - -asm( " .section .fini \n" - " .globl _fini \n" - " .align 16 \n" - "_fini: \n" - " push %ebp \n" - " mov %esp,%ebp \n" - " .previous \n"); - -IDENT("Id: crti.c,v 1.2 2008/07/02 00:19:20 gmcgarry Exp "); -IDENT("$NetBSD: crti.c,v 1.1.1.2 2010/06/03 18:58:05 plunky Exp $"); diff --git a/external/bsd/pcc/dist/pcc-libs/csu/linux/i386/crtn.c b/external/bsd/pcc/dist/pcc-libs/csu/linux/i386/crtn.c deleted file mode 100644 index bccc6602b699..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/csu/linux/i386/crtn.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Id: crtn.c,v 1.2 2008/07/02 00:19:20 gmcgarry Exp */ -/* $NetBSD: crtn.c,v 1.1.1.2 2010/06/03 18:58:05 plunky Exp $ */ -/*- - * Copyright (c) 2008 Gregory McGarry - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "common.h" - -asm( " .section .init \n" - " leave \n" - " ret \n" - " .previous \n"); - -asm( " .section .fini \n" - " leave \n" - " ret \n" - " .previous \n"); - -IDENT("Id: crtn.c,v 1.2 2008/07/02 00:19:20 gmcgarry Exp "); -IDENT("$NetBSD: crtn.c,v 1.1.1.2 2010/06/03 18:58:05 plunky Exp $"); diff --git a/external/bsd/pcc/dist/pcc-libs/csu/netbsd/Makefile b/external/bsd/pcc/dist/pcc-libs/csu/netbsd/Makefile deleted file mode 100644 index 22ec361da22b..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/csu/netbsd/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -MACH ?= i386 -TARGET ?= $(MACH)-netbsd -VERSION ?= 0.9.9 -PCCLIBDIR ?= /usr/local/lib/pcc/$(TARGET)/$(VERSION)/lib -SRCDIR ?= . - -CFLAGS = -I$SRCDIR/$(MACH) -I$(SRCDIR) -Wall -Wstrict-prototypes -Wmissing-prototypes - -OBJS = crtbegin.o crtend.o - -all: $(OBJS) - -crtbegin.o: crtbegin.c - $(CC) -O $(CFLAGS) -c -o $@ $< - -crtend.o: crtend.c - $(CC) -O $(CFLAGS) -c -o $@ $< - -install: - mkdir -p ${DESTDIR}$(PCCLIBDIR) - cp $(OBJS) ${DESTDIR}$(PCCLIBDIR) - -clean: - rm -f $(OBJS) diff --git a/external/bsd/pcc/dist/pcc-libs/csu/netbsd/common.h b/external/bsd/pcc/dist/pcc-libs/csu/netbsd/common.h deleted file mode 100644 index df43bdbbb9b6..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/csu/netbsd/common.h +++ /dev/null @@ -1,24 +0,0 @@ -/* Id: common.h,v 1.1 2008/08/24 05:19:10 gmcgarry Exp */ -/* $NetBSD: common.h,v 1.1.1.2 2010/06/03 18:58:05 plunky Exp $ */ -/*- - * Copyright (c) 2008 Gregory McGarry - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#define IDENT(x) asm(".ident\t\"" x "\"") - -#define NULL (void *)0 - -extern void _init(void); -extern void _fini(void); diff --git a/external/bsd/pcc/dist/pcc-libs/csu/netbsd/crtbegin.c b/external/bsd/pcc/dist/pcc-libs/csu/netbsd/crtbegin.c deleted file mode 100644 index b1f805ece123..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/csu/netbsd/crtbegin.c +++ /dev/null @@ -1,121 +0,0 @@ -/* Id: crtbegin.c,v 1.3 2009/08/16 23:07:08 gmcgarry Exp */ -/* $NetBSD: crtbegin.c,v 1.1.1.3 2010/06/03 18:58:05 plunky Exp $ */ -/*- - * Copyright (c) 1998, 2001, 2002 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Paul Kranenburg, Ross Harvey, and Jason R. Thorpe. - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR 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 FOUNDATION 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. - */ - -/* - * Run-time module which handles constructors and destructors. - */ - -#include "common.h" - -extern void (*__CTOR_LIST__[1])(void); -extern void (*__DTOR_LIST__[1])(void); - -asm( " .section .ctors\n" - " .align 2\n" - "__CTOR_LIST__:\n" -#if defined(__x86_64__) || (__sparc64__) - " .quad -1\n" -#else - " .long -1\n" -#endif - " .section .dtors\n" - " .align 2\n" - "__DTOR_LIST__:\n" -#if defined(__x86_64__) || (__sparc64__) - " .quad -1\n" -#else - " .long -1\n" -#endif -); - -static void -__ctors(void) -{ - unsigned long i = (unsigned long) __CTOR_LIST__[0]; - void (**p)(void); - - if (i == (unsigned long) -1) { - for (i = 1; __CTOR_LIST__[i]; i++) - ; - i--; - } - p = __CTOR_LIST__ + i; - while (i--) - (**p--)(); -} - -static void -__dtors(void) -{ - void (**p)(void) = __DTOR_LIST__ + 1; - - while (*p) - (**p++)(); -} - -void -__do_global_ctors_aux(void) -{ - static int initialized; - - if (!initialized) { - initialized = 1; - __ctors(); - } -} - -void -__do_global_dtors_aux(void) -{ - static int finished; - - if (finished) - return; - - __dtors(); - - finished = 1; -} - -#define MD_CALL_STATIC_FUNCTION(section, func) \ -void __call_##func(void); \ -void __call_##func(void) \ -{ \ - asm volatile (".section " #section); \ - func(); \ - asm volatile (".previous"); \ -} - -MD_CALL_STATIC_FUNCTION(.init, __do_global_ctors_aux) -MD_CALL_STATIC_FUNCTION(.fini, __do_global_dtors_aux) - -IDENT("Id: crtbegin.c,v 1.3 2009/08/16 23:07:08 gmcgarry Exp "); -IDENT("$NetBSD: crtbegin.c,v 1.1.1.3 2010/06/03 18:58:05 plunky Exp $"); diff --git a/external/bsd/pcc/dist/pcc-libs/csu/netbsd/crtend.c b/external/bsd/pcc/dist/pcc-libs/csu/netbsd/crtend.c deleted file mode 100644 index a00c8c91189a..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/csu/netbsd/crtend.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Id: crtend.c,v 1.2 2009/08/16 23:07:08 gmcgarry Exp */ -/* $NetBSD: crtend.c,v 1.1.1.3 2010/06/03 18:58:05 plunky Exp $ */ -/*- - * Copyright (c) 2008 Gregory McGarry - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include "common.h" - -asm( " .section .ctors\n" -#if defined(__x86_64__) || defined(__sparc64__) - " .quad 0\n" -#else - " .long 0\n" -#endif -); - -asm( " .section .dtors\n" -#if defined(__x86_64__) || defined(__sparc64__) - " .quad 0\n" -#else - " .long 0\n" -#endif -); - -IDENT("Id: crtend.c,v 1.2 2009/08/16 23:07:08 gmcgarry Exp "); -IDENT("$NetBSD: crtend.c,v 1.1.1.3 2010/06/03 18:58:05 plunky Exp $"); diff --git a/external/bsd/pcc/dist/pcc-libs/install-sh b/external/bsd/pcc/dist/pcc-libs/install-sh deleted file mode 100755 index 0ec27bcd488d..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/install-sh +++ /dev/null @@ -1,294 +0,0 @@ -#!/bin/sh -# -# install - install a program, script, or datafile -# -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. - - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -transformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" - -while [ x"$1" != x ]; do - case $1 in - -c) instcmd=$cpprog - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd=$stripprog - shift - continue;; - - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac -done - -if [ x"$src" = x ] -then - echo "$0: no input file specified" >&2 - exit 1 -else - : -fi - -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d "$dst" ]; then - instcmd=: - chmodcmd="" - else - instcmd=$mkdirprog - fi -else - -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. - - if [ -f "$src" ] || [ -d "$src" ] - then - : - else - echo "$0: $src does not exist" >&2 - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "$0: no destination specified" >&2 - exit 1 - else - : - fi - -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d "$dst" ] - then - dst=$dst/`basename "$src"` - else - : - fi -fi - -## this sed command emulates the dirname command -dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' - ' -IFS="${IFS-$defaultIFS}" - -oIFS=$IFS -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS=$oIFS - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp=$pathcomp$1 - shift - - if [ ! -d "$pathcomp" ] ; - then - $mkdirprog "$pathcomp" - else - : - fi - - pathcomp=$pathcomp/ -done -fi - -if [ x"$dir_arg" != x ] -then - $doit $instcmd "$dst" && - - if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi -else - -# If we're going to rename the final executable, determine the name now. - - if [ x"$transformarg" = x ] - then - dstfile=`basename "$dst"` - else - dstfile=`basename "$dst" $transformbasename | - sed $transformarg`$transformbasename - fi - -# don't allow the sed command to completely eliminate the filename - - if [ x"$dstfile" = x ] - then - dstfile=`basename "$dst"` - else - : - fi - -# Make a couple of temp file names in the proper directory. - - dsttmp=$dstdir/#inst.$$# - rmtmp=$dstdir/#rm.$$# - -# Trap to clean up temp files at exit. - - trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 - trap '(exit $?); exit' 1 2 13 15 - -# Move or copy the file name to the temp name - - $doit $instcmd "$src" "$dsttmp" && - -# and set any options; do chmod last to preserve setuid bits - -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. - - if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi && - -# Now remove or move aside any old file at destination location. We try this -# two ways since rm can't unlink itself on some systems and the destination -# file might be busy for other reasons. In this case, the final cleanup -# might fail but the new file should still install successfully. - -{ - if [ -f "$dstdir/$dstfile" ] - then - $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null || - $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null || - { - echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 - (exit 1); exit - } - else - : - fi -} && - -# Now rename the file to the real destination. - - $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" - -fi && - -# The final little trick to "correctly" pass the exit status to the exit trap. - -{ - (exit 0); exit -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/Makefile b/external/bsd/pcc/dist/pcc-libs/libF77/Makefile deleted file mode 100644 index e332e8928497..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -# compile, then strip unnecessary symbols - -CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes - -.c.o : - cc -O $(CFLAGS) -c $< - -ld -r -x $*.o - mv a.out $*.o - -MISC = main.o s_rnge.o abort_.o getarg_.o iargc_.o signal_.o s_stop.o s_paus.o -POW = pow_ci.o pow_dd.o pow_di.o pow_hh.o pow_ii.o pow_ri.o pow_zi.o pow_zz.o -CX = c_abs.o c_cos.o c_div.o c_exp.o c_log.o c_sin.o c_sqrt.o -DCX = z_abs.o z_cos.o z_div.o z_exp.o z_log.o z_sin.o z_sqrt.o -REAL = r_abs.o r_acos.o r_asin.o r_atan.o r_atn2.o r_cnjg.o r_cos.o\ - r_cosh.o r_dim.o r_exp.o r_imag.o r_int.o\ - r_lg10.o r_log.o r_mod.o r_nint.o r_sign.o\ - r_sin.o r_sinh.o r_sqrt.o r_tan.o r_tanh.o -DBL = d_abs.o d_acos.o d_asin.o d_atan.o d_atn2.o\ - d_cnjg.o d_cos.o d_cosh.o d_dim.o d_exp.o\ - d_imag.o d_int.o d_lg10.o d_log.o d_mod.o\ - d_nint.o d_prod.o d_sign.o d_sin.o d_sinh.o\ - d_sqrt.o d_tan.o d_tanh.o -INT = i_abs.o i_dim.o i_dnnt.o i_indx.o i_len.o i_mod.o i_nint.o i_sign.o -HALF = h_abs.o h_dim.o h_dnnt.o h_indx.o h_len.o h_mod.o h_nint.o h_sign.o -CMP = l_ge.o l_gt.o l_le.o l_lt.o hl_ge.o hl_gt.o hl_le.o hl_lt.o -CHAR = s_cat.o s_cmp.o s_copy.o - -libF77.a : $(MISC) $(POW) $(CX) $(DCX) $(REAL) $(DBL) $(INT) $(HALF) $(CMP) $(CHAR) cabs.o - ar r libF77.a $? - -clean: - rm -f $(MISC) $(POW) $(CX) $(DCX) $(REAL) $(DBL) $(INT) $(HALF) \ - $(CMP) $(CHAR) cabs.o libF77.a diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/abort_.c b/external/bsd/pcc/dist/pcc-libs/libF77/abort_.c deleted file mode 100644 index 9b22ca76d5c3..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/abort_.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Id: abort_.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: abort_.c,v 1.1.1.2 2010/06/03 18:58:05 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 -#include - -#include "f77lib.h" - -void -abort_(void) -{ - fprintf(stderr, "Fortran abort routine called\n"); - abort(); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/c_abs.c b/external/bsd/pcc/dist/pcc-libs/libF77/c_abs.c deleted file mode 100644 index 1333ae65caf0..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/c_abs.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Id: c_abs.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: c_abs.c,v 1.1.1.2 2010/06/03 18:58:05 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -float -c_abs(complex *z) -{ - return( fcabs( z->real, z->imag ) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/c_cos.c b/external/bsd/pcc/dist/pcc-libs/libF77/c_cos.c deleted file mode 100644 index 1b45e19ccea6..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/c_cos.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Id: c_cos.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: c_cos.c,v 1.1.1.2 2010/06/03 18:58:05 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -void -c_cos(complex *r, complex *z) -{ - r->real = cos(z->real) * cosh(z->imag); - r->imag = - sin(z->real) * sinh(z->imag); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/c_div.c b/external/bsd/pcc/dist/pcc-libs/libF77/c_div.c deleted file mode 100644 index 4acd49ff6aff..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/c_div.c +++ /dev/null @@ -1,64 +0,0 @@ -/* Id: c_div.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: c_div.c,v 1.1.1.2 2010/06/03 18:58:05 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -void -c_div(complex *c, complex *a, complex *b) -{ - double ratio, den; - double abr, abi; - - if( (abr = b->real) < 0.) - abr = - abr; - if( (abi = b->imag) < 0.) - abi = - abi; - if( abr <= abi ) { - if(abi == 0) - abort(); /* fatal("complex division by zero"); */ - ratio = b->real / b->imag ; - den = b->imag * (1 + ratio*ratio); - c->real = (a->real*ratio + a->imag) / den; - c->imag = (a->imag*ratio - a->real) / den; - } else { - ratio = b->imag / b->real ; - den = b->real * (1 + ratio*ratio); - c->real = (a->real + a->imag*ratio) / den; - c->imag = (a->imag - a->real*ratio) / den; - } - -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/c_exp.c b/external/bsd/pcc/dist/pcc-libs/libF77/c_exp.c deleted file mode 100644 index 7c8d8656c2bf..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/c_exp.c +++ /dev/null @@ -1,48 +0,0 @@ -/* Id: c_exp.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: c_exp.c,v 1.1.1.2 2010/06/03 18:58:05 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -void -c_exp(complex *r, complex *z) -{ - double expx; - - expx = exp(z->real); - r->real = expx * cos(z->imag); - r->imag = expx * sin(z->imag); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/c_log.c b/external/bsd/pcc/dist/pcc-libs/libF77/c_log.c deleted file mode 100644 index 33a17614349a..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/c_log.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Id: c_log.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: c_log.c,v 1.1.1.2 2010/06/03 18:58:05 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -void -c_log(complex *r, complex *z) -{ - - r->imag = atan2(z->imag, z->real); - r->real = log( fcabs(z->real, z->imag) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/c_sin.c b/external/bsd/pcc/dist/pcc-libs/libF77/c_sin.c deleted file mode 100644 index 35d2f0da799a..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/c_sin.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Id: c_sin.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: c_sin.c,v 1.1.1.2 2010/06/03 18:58:05 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -void -c_sin(complex *r, complex *z) -{ - - r->real = sin(z->real) * cosh(z->imag); - r->imag = cos(z->real) * sinh(z->imag); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/c_sqrt.c b/external/bsd/pcc/dist/pcc-libs/libF77/c_sqrt.c deleted file mode 100644 index 03f7786003f0..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/c_sqrt.c +++ /dev/null @@ -1,56 +0,0 @@ -/* Id: c_sqrt.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: c_sqrt.c,v 1.1.1.2 2010/06/03 18:58:05 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -void -c_sqrt(complex *r, complex *z) -{ - double mag; - - if( (mag = fcabs(z->real, z->imag)) == 0.) - r->real = r->imag = 0.; - else if(z->real > 0) { - r->real = sqrt(0.5 * (mag + z->real) ); - r->imag = z->imag / r->real / 2; - } else { - r->imag = sqrt(0.5 * (mag - z->real) ); - if(z->imag < 0) - r->imag = - r->imag; - r->real = z->imag / r->imag /2; - } -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/cabs.c b/external/bsd/pcc/dist/pcc-libs/libF77/cabs.c deleted file mode 100644 index 088afe7d5f23..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/cabs.c +++ /dev/null @@ -1,60 +0,0 @@ -/* Id: cabs.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: cabs.c,v 1.1.1.2 2010/06/03 18:58:05 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double -fcabs(double real, double imag) -{ - double temp; - - if(real < 0) - real = -real; - if(imag < 0) - imag = -imag; - if(imag > real){ - temp = real; - real = imag; - imag = temp; - } - if((real+imag) == real) - return(real); - - temp = imag/real; - temp = real*sqrt(1.0 + temp*temp); /*overflow!!*/ - return(temp); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/complex b/external/bsd/pcc/dist/pcc-libs/libF77/complex deleted file mode 100644 index f3ba452f72e7..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/complex +++ /dev/null @@ -1,37 +0,0 @@ -/* Id: complex,v 1.2 2008/02/26 19:54:41 ragge Exp */ -/* $NetBSD: complex,v 1.1.1.2 2010/06/03 18:58:05 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -typedef struct { float real, imag; } complex; -typedef struct { double dreal, dimag; } dcomplex; diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/d_abs.c b/external/bsd/pcc/dist/pcc-libs/libF77/d_abs.c deleted file mode 100644 index 0bf98742d602..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/d_abs.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Id: d_abs.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: d_abs.c,v 1.1.1.2 2010/06/03 18:58:06 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -double -d_abs(double *x) -{ - if(*x >= 0) - return(*x); - return(- *x); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/d_acos.c b/external/bsd/pcc/dist/pcc-libs/libF77/d_acos.c deleted file mode 100644 index ca062ce047b0..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/d_acos.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Id: d_acos.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: d_acos.c,v 1.1.1.2 2010/06/03 18:58:06 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double -d_acos(double *x) -{ - return( acos(*x) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/d_asin.c b/external/bsd/pcc/dist/pcc-libs/libF77/d_asin.c deleted file mode 100644 index 74b774e852cd..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/d_asin.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Id: d_asin.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: d_asin.c,v 1.1.1.2 2010/06/03 18:58:06 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double -d_asin(double *x) -{ - return( asin(*x) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/d_atan.c b/external/bsd/pcc/dist/pcc-libs/libF77/d_atan.c deleted file mode 100644 index 2c7eb4214abe..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/d_atan.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Id: d_atan.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: d_atan.c,v 1.1.1.2 2010/06/03 18:58:06 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double -d_atan(double *x) -{ - return( atan(*x) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/d_atn2.c b/external/bsd/pcc/dist/pcc-libs/libF77/d_atn2.c deleted file mode 100644 index d022c9bd07f3..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/d_atn2.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Id: d_atn2.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: d_atn2.c,v 1.1.1.2 2010/06/03 18:58:06 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double -d_atn2(double *x,double *y) -{ - return( atan2(*x,*y) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/d_cnjg.c b/external/bsd/pcc/dist/pcc-libs/libF77/d_cnjg.c deleted file mode 100644 index 4ad9b36cead2..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/d_cnjg.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Id: d_cnjg.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: d_cnjg.c,v 1.1.1.2 2010/06/03 18:58:06 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -void -d_cnjg(dcomplex *r, dcomplex *z) -{ - r->dreal = z->dreal; - r->dimag = - z->dimag; -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/d_cos.c b/external/bsd/pcc/dist/pcc-libs/libF77/d_cos.c deleted file mode 100644 index 693ecb181682..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/d_cos.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Id: d_cos.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: d_cos.c,v 1.1.1.2 2010/06/03 18:58:06 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double -d_cos(double *x) -{ - return( cos(*x) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/d_cosh.c b/external/bsd/pcc/dist/pcc-libs/libF77/d_cosh.c deleted file mode 100644 index a272c5deb9b5..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/d_cosh.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Id: d_cosh.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: d_cosh.c,v 1.1.1.2 2010/06/03 18:58:06 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double -d_cosh(double *x) -{ - return( cosh(*x) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/d_dim.c b/external/bsd/pcc/dist/pcc-libs/libF77/d_dim.c deleted file mode 100644 index bc45d1163492..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/d_dim.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Id: d_dim.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: d_dim.c,v 1.1.1.2 2010/06/03 18:58:06 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -double -d_dim(double *a,double *b) -{ - return( *a > *b ? *a - *b : 0); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/d_erf.c b/external/bsd/pcc/dist/pcc-libs/libF77/d_erf.c deleted file mode 100644 index d0008917bb2f..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/d_erf.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Id: d_erf.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: d_erf.c,v 1.1.1.2 2010/06/03 18:58:06 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double -derf_(double *x) -{ - return( erf(*x) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/d_erfc.c b/external/bsd/pcc/dist/pcc-libs/libF77/d_erfc.c deleted file mode 100644 index 8452f3181409..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/d_erfc.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Id: d_erfc.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: d_erfc.c,v 1.1.1.2 2010/06/03 18:58:06 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double -derfc_(double *x) -{ - return( erfc(*x) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/d_exp.c b/external/bsd/pcc/dist/pcc-libs/libF77/d_exp.c deleted file mode 100644 index 962d57050e35..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/d_exp.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Id: d_exp.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: d_exp.c,v 1.1.1.2 2010/06/03 18:58:06 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double -d_exp(double *x) -{ - return( exp(*x) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/d_imag.c b/external/bsd/pcc/dist/pcc-libs/libF77/d_imag.c deleted file mode 100644 index 165343dbbfbb..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/d_imag.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Id: d_imag.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: d_imag.c,v 1.1.1.2 2010/06/03 18:58:06 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -double -d_imag(dcomplex *z) -{ - return(z->dimag); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/d_int.c b/external/bsd/pcc/dist/pcc-libs/libF77/d_int.c deleted file mode 100644 index bd2275376847..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/d_int.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Id: d_int.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: d_int.c,v 1.1.1.2 2010/06/03 18:58:06 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -double -d_int(double *x) -{ - return( (long int) (*x) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/d_lg10.c b/external/bsd/pcc/dist/pcc-libs/libF77/d_lg10.c deleted file mode 100644 index 4a3d10dba99d..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/d_lg10.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Id: d_lg10.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: d_lg10.c,v 1.1.1.2 2010/06/03 18:58:06 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double -d_lg10(double *x) -{ - - return( M_LOG10E * log(*x) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/d_log.c b/external/bsd/pcc/dist/pcc-libs/libF77/d_log.c deleted file mode 100644 index 993c6a0f93ec..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/d_log.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Id: d_log.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: d_log.c,v 1.1.1.2 2010/06/03 18:58:06 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double -d_log(double *x) -{ - return( log(*x) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/d_mod.c b/external/bsd/pcc/dist/pcc-libs/libF77/d_mod.c deleted file mode 100644 index 7f4483fd3799..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/d_mod.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Id: d_mod.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: d_mod.c,v 1.1.1.2 2010/06/03 18:58:06 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -double -d_mod(double *x,double *y) -{ - return(*x - (*y) * ( (long int) (*x / *y)) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/d_nint.c b/external/bsd/pcc/dist/pcc-libs/libF77/d_nint.c deleted file mode 100644 index 4b2e811ca3c8..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/d_nint.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Id: d_nint.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: d_nint.c,v 1.1.1.2 2010/06/03 18:58:06 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -double -d_nint(double *x) -{ - return( (*x)>=0 ? - (long int) (*x + .5) : (long int) (*x - .5) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/d_prod.c b/external/bsd/pcc/dist/pcc-libs/libF77/d_prod.c deleted file mode 100644 index ab880cf7c5f8..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/d_prod.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Id: d_prod.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: d_prod.c,v 1.1.1.2 2010/06/03 18:58:06 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -double -d_prod(float *x,float *y) -{ - return( (*x) * (*y) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/d_sign.c b/external/bsd/pcc/dist/pcc-libs/libF77/d_sign.c deleted file mode 100644 index 9778d4909716..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/d_sign.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Id: d_sign.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: d_sign.c,v 1.1.1.2 2010/06/03 18:58:06 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -double -d_sign(double *a,double *b) -{ - double x; - - x = (*a >= 0 ? *a : - *a); - return( *b >= 0 ? x : -x); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/d_sin.c b/external/bsd/pcc/dist/pcc-libs/libF77/d_sin.c deleted file mode 100644 index 51b80c17d7a0..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/d_sin.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Id: d_sin.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: d_sin.c,v 1.1.1.2 2010/06/03 18:58:06 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double -d_sin(double *x) -{ - return( sin(*x) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/d_sinh.c b/external/bsd/pcc/dist/pcc-libs/libF77/d_sinh.c deleted file mode 100644 index ad9f18ec6750..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/d_sinh.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Id: d_sinh.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: d_sinh.c,v 1.1.1.2 2010/06/03 18:58:06 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double -d_sinh(double *x) -{ - return( sinh(*x) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/d_sqrt.c b/external/bsd/pcc/dist/pcc-libs/libF77/d_sqrt.c deleted file mode 100644 index f70be7b17a08..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/d_sqrt.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Id: d_sqrt.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: d_sqrt.c,v 1.1.1.2 2010/06/03 18:58:06 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double -d_sqrt(double *x) -{ - return( sqrt(*x) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/d_tan.c b/external/bsd/pcc/dist/pcc-libs/libF77/d_tan.c deleted file mode 100644 index 75ae3817d782..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/d_tan.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Id: d_tan.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: d_tan.c,v 1.1.1.2 2010/06/03 18:58:06 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double -d_tan(double *x) -{ - return( tan(*x) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/d_tanh.c b/external/bsd/pcc/dist/pcc-libs/libF77/d_tanh.c deleted file mode 100644 index b5d02a2c6bf8..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/d_tanh.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Id: d_tanh.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: d_tanh.c,v 1.1.1.2 2010/06/03 18:58:06 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double d_tanh(double *x) -{ - return( tanh(*x) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/erf.c b/external/bsd/pcc/dist/pcc-libs/libF77/erf.c deleted file mode 100644 index a8ea5eb1fc32..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/erf.c +++ /dev/null @@ -1,151 +0,0 @@ -/* Id: erf.c,v 1.2 2008/02/26 19:54:41 ragge Exp */ -/* $NetBSD: erf.c,v 1.1.1.2 2010/06/03 18:58:07 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -/* - C program for floating point error function - - erf(x) returns the error function of its argument - erfc(x) returns 1.0-erf(x) - - erf(x) is defined by - ${2 over sqrt(pi)} int from 0 to x e sup {-t sup 2} dt$ - - the entry for erfc is provided because of the - extreme loss of relative accuracy if erf(x) is - called for large x and the result subtracted - from 1. (e.g. for x= 10, 12 places are lost). - - There are no error returns. - - Calls exp. - - Coefficients for large x are #5667 from Hart & Cheney (18.72D). -*/ - -#define M 7 -#define N 9 -int errno; -static double torp = 1.1283791670955125738961589031; -static double p1[] = { - 0.804373630960840172832162e5, - 0.740407142710151470082064e4, - 0.301782788536507577809226e4, - 0.380140318123903008244444e2, - 0.143383842191748205576712e2, - -.288805137207594084924010e0, - 0.007547728033418631287834e0, -}; -static double q1[] = { - 0.804373630960840172826266e5, - 0.342165257924628539769006e5, - 0.637960017324428279487120e4, - 0.658070155459240506326937e3, - 0.380190713951939403753468e2, - 0.100000000000000000000000e1, - 0.0, -}; -static double p2[] = { - 0.18263348842295112592168999e4, - 0.28980293292167655611275846e4, - 0.2320439590251635247384768711e4, - 0.1143262070703886173606073338e4, - 0.3685196154710010637133875746e3, - 0.7708161730368428609781633646e2, - 0.9675807882987265400604202961e1, - 0.5641877825507397413087057563e0, - 0.0, -}; -static double q2[] = { - 0.18263348842295112595576438e4, - 0.495882756472114071495438422e4, - 0.60895424232724435504633068e4, - 0.4429612803883682726711528526e4, - 0.2094384367789539593790281779e4, - 0.6617361207107653469211984771e3, - 0.1371255960500622202878443578e3, - 0.1714980943627607849376131193e2, - 1.0, -}; - -double -erf(arg) double arg;{ - double erfc(); - int sign; - double argsq; - double d, n; - int i; - - errno = 0; - sign = 1; - if(arg < 0.){ - arg = -arg; - sign = -1; - } - if(arg < 0.5){ - argsq = arg*arg; - for(n=0,d=0,i=M-1; i>=0; i--){ - n = n*argsq + p1[i]; - d = d*argsq + q1[i]; - } - return(sign*torp*arg*n/d); - } - if(arg >= 10.) - return(sign*1.); - return(sign*(1. - erfc(arg))); -} - -double -erfc(arg) double arg;{ - double erf(); - double exp(); - double n, d; - int i; - - errno = 0; - if(arg < 0.) - return(2. - erfc(-arg)); -/* - if(arg < 0.5) - return(1. - erf(arg)); -*/ - if(arg >= 10.) - return(0.); - - for(n=0,d=0,i=N-1; i>=0; i--){ - n = n*arg + p2[i]; - d = d*arg + q2[i]; - } - return(exp(-arg*arg)*n/d); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/f77lib.h b/external/bsd/pcc/dist/pcc-libs/libF77/f77lib.h deleted file mode 100644 index 7287d1cd0c8f..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/f77lib.h +++ /dev/null @@ -1,113 +0,0 @@ -/* declarations */ -typedef struct { float real, imag; } complex; -typedef struct { double dreal, dimag; } dcomplex; - -/* prototypes */ -void s_rnge(char *varn, long int offset, char *procn, int line); -void abort_(void); -void getarg_(long int *n, char *s, long int ls); -long int iargc_(void); -void (*signal_(int *sigp, void (**procp)(int)))(int); -void s_stop(char *s, long int n); -void f_exit(void); -void s_paus(char *s, long int n); -void pow_ci(complex *p, complex *a, long int *b); -void pow_zi(dcomplex *p, dcomplex *a, long int *b); -double pow_dd(double *ap, double *bp); -double pow_di(double *ap, long int *bp); -short pow_hh(short *ap, short *bp); -long int pow_ii(long int *ap, long int *bp); -float pow_ri(float *ap, long int *bp); -void z_div(dcomplex *c, dcomplex *a, dcomplex *b); -void pow_zz(dcomplex *r,dcomplex *a,dcomplex *b); -float c_abs(complex *z); -void c_cos(complex *r, complex *z); -void c_div(complex *c, complex *a, complex *b); -void c_exp(complex *r, complex *z); -void c_log(complex *r, complex *z); -void c_sin(complex *r, complex *z); -void c_sqrt(complex *r, complex *z); -double z_abs(dcomplex *z); -void z_cos(dcomplex *r, dcomplex *z); -void z_exp(dcomplex *r, dcomplex *z); -void z_log(dcomplex *r, dcomplex *z); -void z_sin(dcomplex *r, dcomplex *z); -void z_sqrt(dcomplex *r, dcomplex *z); -double r_abs(float *x); -double r_acos(float *x); -double r_asin(float *x); -double r_atan(float *x); -double r_atn2(float *x,float *y); -void r_cnjg(complex *r, complex *z); -double r_cos(float *x); -double r_cosh(float *x); -double r_dim(float *a,float *b); -double r_exp(float *x); -double r_imag(complex *z); -double r_int(float *x); -double r_lg10(float *x); -double r_log(float *x); -double r_mod(float *x,float *y); -double r_nint(float *x); -double r_sign(float *a,float *b); -double r_sin(float *x); -double r_sinh(float *x); -double r_sqrt(float *x); -double r_tan(float *x); -double r_tanh(float *x); -double d_abs(double *x); -double d_acos(double *x); -double d_asin(double *x); -double d_atan(double *x); -double d_atn2(double *x,double *y); -void d_cnjg(dcomplex *r, dcomplex *z); -double d_cos(double *x); -double d_cosh(double *x); -double d_dim(double *a,double *b); -double derf_(double *x); -double derfc_(double *x); -double d_exp(double *x); -double d_imag(dcomplex *z); -double d_int(double *x); -double d_lg10(double *x); -double d_log(double *x); -double d_mod(double *x,double *y); -double d_nint(double *x); -double d_prod(float *x,float *y); -double d_sign(double *a,double *b); -double d_sin(double *x); -double d_sinh(double *x); -double d_sqrt(double *x); -double d_tan(double *x); -double d_tanh(double *x); -long int i_abs(long int *x); -long int i_dim(long int *a,long int *b); -long int i_dnnt(double *x); -long int i_indx(char *a, char *b, long int la, long int lb); -long int i_len(char *s, long int n); -long int i_mod(long int *a,long int *b); -long int i_nint(float *x); -long int i_sign(long int *a,long int *b); -short h_abs(short *x); -short h_dim(short *a,short *b); -short h_dnnt(double *x); -short h_indx(char *a, char *b, long int la, long int lb); -short h_len(char *s, long int n); -short h_mod(short *a,short *b); -short h_nint(float *x); -short h_sign(short *a,short *b); -long int l_ge(char *a,char *b,long int la,long int lb); -long int l_gt(char *a,char *b,long int la,long int lb); -long int l_le(char *a,char *b,long int la,long int lb); -long int l_lt(char *a,char *b,long int la,long int lb); -int s_cmp(char *a, char *b, long int la, long int lb); -short hl_ge(char *a,char *b,long int la,long int lb); -short hl_gt(char *a,char *b,long int la,long int lb); -short hl_le(char *a,char *b,long int la,long int lb); -short hl_lt(char *a,char *b,long int la,long int lb); -void s_cat(char *lp, char *rpp[], long int rnp[], long int *np, long int ll); -void s_copy(char *a, char *b, long int la, long int lb); -double fcabs(double real, double imag); - - - diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/getarg_.c b/external/bsd/pcc/dist/pcc-libs/libF77/getarg_.c deleted file mode 100644 index 3fbc9124db16..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/getarg_.c +++ /dev/null @@ -1,59 +0,0 @@ -/* Id: getarg_.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: getarg_.c,v 1.1.1.2 2010/06/03 18:58:07 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -/* - * subroutine getarg(k, c) - * returns the kth unix command argument in fortran character - * variable argument c -*/ -#include "f77lib.h" - -void -getarg_(long int *n, char *s, long int ls) -{ - extern int xargc; - extern char **xargv; - char *t; - int i; - - if(*n>0 && *n= 0) - return(*x); - return(- *x); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/h_dim.c b/external/bsd/pcc/dist/pcc-libs/libF77/h_dim.c deleted file mode 100644 index a9157a7ca1ae..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/h_dim.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Id: h_dim.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: h_dim.c,v 1.1.1.2 2010/06/03 18:58:07 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -short -h_dim(short *a,short *b) -{ - return( *a > *b ? *a - *b : 0); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/h_dnnt.c b/external/bsd/pcc/dist/pcc-libs/libF77/h_dnnt.c deleted file mode 100644 index e6f8f92055ae..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/h_dnnt.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Id: h_dnnt.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: h_dnnt.c,v 1.1.1.2 2010/06/03 18:58:07 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -short -h_dnnt(double *x) -{ - return( (*x)>=0 ? - (short) (*x + .5) : (short) (*x - .5) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/h_indx.c b/external/bsd/pcc/dist/pcc-libs/libF77/h_indx.c deleted file mode 100644 index 003628066402..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/h_indx.c +++ /dev/null @@ -1,57 +0,0 @@ -/* Id: h_indx.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: h_indx.c,v 1.1.1.2 2010/06/03 18:58:07 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -short -h_indx(char *a, char *b, long int la, long int lb) -{ - int i, n; - char *s, *t, *bend; - - n = la - lb + 1; - bend = b + lb; - - for(i = 0 ; i < n ; ++i) { - s = a + i; - t = b; - while(t < bend) - if(*s++ != *t++) - goto no; - return(i+1); - no: ; - } - return(0); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/h_len.c b/external/bsd/pcc/dist/pcc-libs/libF77/h_len.c deleted file mode 100644 index 014b4db6fe38..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/h_len.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Id: h_len.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: h_len.c,v 1.1.1.2 2010/06/03 18:58:07 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -short -h_len(char *s, long int n) -{ - return(n); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/h_mod.c b/external/bsd/pcc/dist/pcc-libs/libF77/h_mod.c deleted file mode 100644 index 93102ce74f3f..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/h_mod.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Id: h_mod.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: h_mod.c,v 1.1.1.2 2010/06/03 18:58:07 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -short -h_mod(short *a,short *b) -{ - return( *a % *b); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/h_nint.c b/external/bsd/pcc/dist/pcc-libs/libF77/h_nint.c deleted file mode 100644 index 3e71687c3677..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/h_nint.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Id: h_nint.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: h_nint.c,v 1.1.1.2 2010/06/03 18:58:07 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -short -h_nint(float *x) -{ - return( (*x)>=0 ? - (short) (*x + .5) : (short) (*x - .5) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/h_sign.c b/external/bsd/pcc/dist/pcc-libs/libF77/h_sign.c deleted file mode 100644 index 64a1b1bf34e8..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/h_sign.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Id: h_sign.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: h_sign.c,v 1.1.1.2 2010/06/03 18:58:07 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -short -h_sign(short *a,short *b) -{ - short x; - - x = (*a >= 0 ? *a : - *a); - return( *b >= 0 ? x : -x); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/hl_ge.c b/external/bsd/pcc/dist/pcc-libs/libF77/hl_ge.c deleted file mode 100644 index 6780b285c46f..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/hl_ge.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Id: hl_ge.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: hl_ge.c,v 1.1.1.2 2010/06/03 18:58:07 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -short -hl_ge(char *a,char *b,long int la,long int lb) -{ - return(s_cmp(a,b,la,lb) >= 0); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/hl_gt.c b/external/bsd/pcc/dist/pcc-libs/libF77/hl_gt.c deleted file mode 100644 index 027dea41a98d..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/hl_gt.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Id: hl_gt.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: hl_gt.c,v 1.1.1.2 2010/06/03 18:58:07 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -short -hl_gt(char *a,char *b,long int la,long int lb) -{ - return(s_cmp(a,b,la,lb) > 0); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/hl_le.c b/external/bsd/pcc/dist/pcc-libs/libF77/hl_le.c deleted file mode 100644 index ce0809db4ee6..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/hl_le.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Id: hl_le.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: hl_le.c,v 1.1.1.2 2010/06/03 18:58:07 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -short -hl_le(char *a,char *b,long int la,long int lb) -{ - return(s_cmp(a,b,la,lb) <= 0); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/hl_lt.c b/external/bsd/pcc/dist/pcc-libs/libF77/hl_lt.c deleted file mode 100644 index 86f19d8858f1..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/hl_lt.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Id: hl_lt.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: hl_lt.c,v 1.1.1.2 2010/06/03 18:58:07 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -short -hl_lt(char *a,char *b,long int la,long int lb) -{ - return(s_cmp(a,b,la,lb) < 0); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/i_abs.c b/external/bsd/pcc/dist/pcc-libs/libF77/i_abs.c deleted file mode 100644 index 2a8303b95398..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/i_abs.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Id: i_abs.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: i_abs.c,v 1.1.1.2 2010/06/03 18:58:07 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -long int -i_abs(long int *x) -{ - if(*x >= 0) - return(*x); - return(- *x); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/i_dim.c b/external/bsd/pcc/dist/pcc-libs/libF77/i_dim.c deleted file mode 100644 index 6edab0124226..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/i_dim.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Id: i_dim.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: i_dim.c,v 1.1.1.2 2010/06/03 18:58:07 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -long int -i_dim(long int *a,long int *b) -{ - return( *a > *b ? *a - *b : 0); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/i_dnnt.c b/external/bsd/pcc/dist/pcc-libs/libF77/i_dnnt.c deleted file mode 100644 index 88a06e95a931..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/i_dnnt.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Id: i_dnnt.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: i_dnnt.c,v 1.1.1.2 2010/06/03 18:58:07 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -long int -i_dnnt(double *x) -{ - return( (*x)>=0 ? - (long int) (*x + .5) : (long int) (*x - .5) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/i_indx.c b/external/bsd/pcc/dist/pcc-libs/libF77/i_indx.c deleted file mode 100644 index 75313d4f9e13..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/i_indx.c +++ /dev/null @@ -1,57 +0,0 @@ -/* Id: i_indx.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: i_indx.c,v 1.1.1.2 2010/06/03 18:58:07 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -long int -i_indx(char *a, char *b, long int la, long int lb) -{ - long int i, n; - char *s, *t, *bend; - - n = la - lb + 1; - bend = b + lb; - - for(i = 0 ; i < n ; ++i) { - s = a + i; - t = b; - while(t < bend) - if(*s++ != *t++) - goto no; - return(i+1); - no: ; - } - return(0); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/i_len.c b/external/bsd/pcc/dist/pcc-libs/libF77/i_len.c deleted file mode 100644 index d56c1e291dca..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/i_len.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Id: i_len.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: i_len.c,v 1.1.1.2 2010/06/03 18:58:07 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -long int -i_len(char *s, long int n) -{ - return(n); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/i_mod.c b/external/bsd/pcc/dist/pcc-libs/libF77/i_mod.c deleted file mode 100644 index 9702c4ed7005..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/i_mod.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Id: i_mod.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: i_mod.c,v 1.1.1.2 2010/06/03 18:58:07 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -long int -i_mod(long int *a,long int *b) -{ - return( *a % *b); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/i_nint.c b/external/bsd/pcc/dist/pcc-libs/libF77/i_nint.c deleted file mode 100644 index 775683d8e832..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/i_nint.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Id: i_nint.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: i_nint.c,v 1.1.1.2 2010/06/03 18:58:07 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -long int -i_nint(float *x) -{ - return( (*x)>=0 ? - (long int) (*x + .5) : (long int) (*x - .5) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/i_sign.c b/external/bsd/pcc/dist/pcc-libs/libF77/i_sign.c deleted file mode 100644 index 358b4963e243..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/i_sign.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Id: i_sign.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: i_sign.c,v 1.1.1.2 2010/06/03 18:58:07 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -long int -i_sign(long int *a,long int *b) -{ - long int x; - - x = (*a >= 0 ? *a : - *a); - return( *b >= 0 ? x : -x); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/iargc_.c b/external/bsd/pcc/dist/pcc-libs/libF77/iargc_.c deleted file mode 100644 index 30bf75516d91..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/iargc_.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Id: iargc_.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: iargc_.c,v 1.1.1.2 2010/06/03 18:58:08 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -long int -iargc_() -{ - extern int xargc; - return ( xargc - 1 ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/l_ge.c b/external/bsd/pcc/dist/pcc-libs/libF77/l_ge.c deleted file mode 100644 index f016956d9d68..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/l_ge.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Id: l_ge.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: l_ge.c,v 1.1.1.2 2010/06/03 18:58:08 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -long int -l_ge(char *a,char *b,long int la,long int lb) -{ - return(s_cmp(a,b,la,lb) >= 0); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/l_gt.c b/external/bsd/pcc/dist/pcc-libs/libF77/l_gt.c deleted file mode 100644 index 695ff6e47e84..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/l_gt.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Id: l_gt.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: l_gt.c,v 1.1.1.2 2010/06/03 18:58:08 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -long int -l_gt(char *a,char *b,long int la,long int lb) -{ - return(s_cmp(a,b,la,lb) > 0); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/l_le.c b/external/bsd/pcc/dist/pcc-libs/libF77/l_le.c deleted file mode 100644 index d383b56fdda5..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/l_le.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Id: l_le.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: l_le.c,v 1.1.1.2 2010/06/03 18:58:08 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -long int -l_le(char *a,char *b,long int la,long int lb) -{ - return(s_cmp(a,b,la,lb) <= 0); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/l_lt.c b/external/bsd/pcc/dist/pcc-libs/libF77/l_lt.c deleted file mode 100644 index df840bf72a03..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/l_lt.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Id: l_lt.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: l_lt.c,v 1.1.1.2 2010/06/03 18:58:08 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -long int -l_lt(char *a,char *b,long int la,long int lb) -{ - return(s_cmp(a,b,la,lb) < 0); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/main.c b/external/bsd/pcc/dist/pcc-libs/libF77/main.c deleted file mode 100644 index bae3075a90e5..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/main.c +++ /dev/null @@ -1,87 +0,0 @@ -/* Id: main.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: main.c,v 1.1.1.2 2010/06/03 18:58:08 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -/* STARTUP PROCEDURE FOR UNIX FORTRAN PROGRAMS */ - -#include -#include -#include - -static void sigfdie(int), sigidie(int); -static void sigdie(char *s); -void MAIN__(void); -void f_exit(void); - -int xargc; -char **xargv; - -int -main(int argc, char **argv, char **arge) -{ - - xargc = argc; - xargv = argv; - signal(SIGFPE, sigfdie); /* ignore underflow, enable overflow */ - signal(SIGIOT, sigidie); - MAIN__(); - f_exit(); - return 0; -} - -static void -sigfdie(int a) -{ - sigdie("Floating Exception"); -} - -static void -sigidie(int a) -{ - sigdie("IOT Trap"); -} - -static void -sigdie(char *s) -{ - /* print error message, then clear buffers */ - fflush(stderr); - fprintf(stderr, "%s\n", s); - f_exit(); - fflush(stderr); - - /* now get a core */ - signal(SIGIOT, 0); - abort(); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/pow_ci.c b/external/bsd/pcc/dist/pcc-libs/libF77/pow_ci.c deleted file mode 100644 index 2c7f0cc0a524..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/pow_ci.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Id: pow_ci.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: pow_ci.c,v 1.1.1.2 2010/06/03 18:58:08 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -void -pow_ci(complex *p, complex *a, long int *b) /* p = a**b */ -{ - dcomplex p1, a1; - - a1.dreal = a->real; - a1.dimag = a->imag; - - pow_zi(&p1, &a1, b); - - p->real = p1.dreal; - p->imag = p1.dimag; -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/pow_dd.c b/external/bsd/pcc/dist/pcc-libs/libF77/pow_dd.c deleted file mode 100644 index e7fbe22f93a1..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/pow_dd.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Id: pow_dd.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: pow_dd.c,v 1.1.1.2 2010/06/03 18:58:08 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double -pow_dd(double *ap, double *bp) -{ - return(pow(*ap, *bp) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/pow_di.c b/external/bsd/pcc/dist/pcc-libs/libF77/pow_di.c deleted file mode 100644 index 7e67c9c9f1fd..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/pow_di.c +++ /dev/null @@ -1,66 +0,0 @@ -/* Id: pow_di.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: pow_di.c,v 1.1.1.2 2010/06/03 18:58:08 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -double -pow_di(double *ap, long int *bp) -{ - double pow, x; - long int n; - - pow = 1; - x = *ap; - n = *bp; - - if(n != 0) { - if(n < 0) { - if(x == 0) { - return(pow); - } - n = -n; - x = 1/x; - } - for( ; ; ) { - if(n & 01) - pow *= x; - if(n >>= 1) - x *= x; - else - break; - } - } - return(pow); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/pow_hh.c b/external/bsd/pcc/dist/pcc-libs/libF77/pow_hh.c deleted file mode 100644 index de5f84d0453a..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/pow_hh.c +++ /dev/null @@ -1,60 +0,0 @@ -/* Id: pow_hh.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: pow_hh.c,v 1.1.1.2 2010/06/03 18:58:08 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -short -pow_hh(short *ap, short *bp) -{ - short pow, x, n; - - pow = 1; - x = *ap; - n = *bp; - - if(n < 0) { - ; - } else if(n > 0) { - for( ; ; ) { - if(n & 01) - pow *= x; - if(n >>= 1) - x *= x; - else - break; - } - } - return(pow); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/pow_ii.c b/external/bsd/pcc/dist/pcc-libs/libF77/pow_ii.c deleted file mode 100644 index 6f5f031c5404..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/pow_ii.c +++ /dev/null @@ -1,60 +0,0 @@ -/* Id: pow_ii.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: pow_ii.c,v 1.1.1.2 2010/06/03 18:58:08 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -long int -pow_ii(long int *ap, long int *bp) -{ - long int pow, x, n; - - pow = 1; - x = *ap; - n = *bp; - - if(n < 0) { - ; - } else if(n > 0) { - for( ; ; ) { - if(n & 01) - pow *= x; - if(n >>= 1) - x *= x; - else - break; - } - } - return(pow); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/pow_ri.c b/external/bsd/pcc/dist/pcc-libs/libF77/pow_ri.c deleted file mode 100644 index c6464fe4ead2..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/pow_ri.c +++ /dev/null @@ -1,66 +0,0 @@ -/* Id: pow_ri.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: pow_ri.c,v 1.1.1.2 2010/06/03 18:58:08 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -float -pow_ri(float *ap, long int *bp) -{ - double pow, x; - long int n; - - pow = 1; - x = *ap; - n = *bp; - - if(n != 0) { - if(n < 0) { - if(x == 0) { - return(pow); - } - n = -n; - x = 1/x; - } - for( ; ; ) { - if(n & 01) - pow *= x; - if(n >>= 1) - x *= x; - else - break; - } - } - return(pow); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/pow_zi.c b/external/bsd/pcc/dist/pcc-libs/libF77/pow_zi.c deleted file mode 100644 index 0653e723986d..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/pow_zi.c +++ /dev/null @@ -1,72 +0,0 @@ -/* Id: pow_zi.c,v 1.3 2008/02/27 17:09:54 ragge Exp */ -/* $NetBSD: pow_zi.c,v 1.1.1.2 2010/06/03 18:58:08 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -void -pow_zi(dcomplex *p, dcomplex *a, long int *b) /* p = a**b */ -{ - long int n; - double t; - dcomplex x; - - n = *b; - p->dreal = 1; - p->dimag = 0; - - if(n == 0) - return; - if(n < 0) { - n = -n; - z_div(&x, p, a); - } else { - x.dreal = a->dreal; - x.dimag = a->dimag; - } - - for( ; ; ) { - if(n & 01) { - t = p->dreal * x.dreal - p->dimag * x.dimag; - p->dimag = p->dreal * x.dimag + p->dimag * x.dreal; - p->dreal = t; - } - if(n >>= 1) { - t = x.dreal * x.dreal - x.dimag * x.dimag; - x.dimag = 2 * x.dreal * x.dimag; - x.dreal = t; - } else - break; - } -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/pow_zz.c b/external/bsd/pcc/dist/pcc-libs/libF77/pow_zz.c deleted file mode 100644 index 4800961bca0d..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/pow_zz.c +++ /dev/null @@ -1,53 +0,0 @@ -/* Id: pow_zz.c,v 1.4 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: pow_zz.c,v 1.1.1.2 2010/06/03 18:58:08 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -void -pow_zz(dcomplex *r,dcomplex *a,dcomplex *b) -{ - double logr, logi, x, y; - - logr = log( fcabs(a->dreal, a->dimag) ); - logi = atan2(a->dimag, a->dreal); - - x = exp( logr * b->dreal - logi * b->dimag ); - y = logr * b->dimag + logi * b->dreal; - - r->dreal = x * cos(y); - r->dimag = x * sin(y); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/r_abs.c b/external/bsd/pcc/dist/pcc-libs/libF77/r_abs.c deleted file mode 100644 index cf9c2d86cf24..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/r_abs.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Id: r_abs.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: r_abs.c,v 1.1.1.2 2010/06/03 18:58:08 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -double -r_abs(float *x) -{ - if(*x >= 0) - return(*x); - return(- *x); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/r_acos.c b/external/bsd/pcc/dist/pcc-libs/libF77/r_acos.c deleted file mode 100644 index ce0ba08c7345..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/r_acos.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Id: r_acos.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: r_acos.c,v 1.1.1.2 2010/06/03 18:58:08 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double -r_acos(float *x) -{ - return( acos(*x) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/r_asin.c b/external/bsd/pcc/dist/pcc-libs/libF77/r_asin.c deleted file mode 100644 index 1e35238f7fc6..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/r_asin.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Id: r_asin.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: r_asin.c,v 1.1.1.2 2010/06/03 18:58:08 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double -r_asin(float *x) -{ - return( asin(*x) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/r_atan.c b/external/bsd/pcc/dist/pcc-libs/libF77/r_atan.c deleted file mode 100644 index 9c380a11e577..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/r_atan.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Id: r_atan.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: r_atan.c,v 1.1.1.2 2010/06/03 18:58:08 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double -r_atan(float *x) -{ - return( atan(*x) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/r_atn2.c b/external/bsd/pcc/dist/pcc-libs/libF77/r_atn2.c deleted file mode 100644 index b6ac01dd2dfb..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/r_atn2.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Id: r_atn2.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: r_atn2.c,v 1.1.1.2 2010/06/03 18:58:08 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double -r_atn2(float *x,float *y) -{ - return( atan2(*x,*y) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/r_cnjg.c b/external/bsd/pcc/dist/pcc-libs/libF77/r_cnjg.c deleted file mode 100644 index 6bfd5bb182ef..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/r_cnjg.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Id: r_cnjg.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: r_cnjg.c,v 1.1.1.2 2010/06/03 18:58:08 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -void -r_cnjg(complex *r, complex *z) -{ - r->real = z->real; - r->imag = - z->imag; -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/r_cos.c b/external/bsd/pcc/dist/pcc-libs/libF77/r_cos.c deleted file mode 100644 index 63bb16c544b8..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/r_cos.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Id: r_cos.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: r_cos.c,v 1.1.1.2 2010/06/03 18:58:09 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double -r_cos(float *x) -{ - return( cos(*x) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/r_cosh.c b/external/bsd/pcc/dist/pcc-libs/libF77/r_cosh.c deleted file mode 100644 index 9e71616a0667..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/r_cosh.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Id: r_cosh.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: r_cosh.c,v 1.1.1.2 2010/06/03 18:58:09 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double -r_cosh(float *x) -{ - return( cosh(*x) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/r_dim.c b/external/bsd/pcc/dist/pcc-libs/libF77/r_dim.c deleted file mode 100644 index 91ddeb11a3ec..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/r_dim.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Id: r_dim.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: r_dim.c,v 1.1.1.2 2010/06/03 18:58:09 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -double -r_dim(float *a,float *b) -{ - return( *a > *b ? *a - *b : 0); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/r_erf.c b/external/bsd/pcc/dist/pcc-libs/libF77/r_erf.c deleted file mode 100644 index 27be83eb6f9d..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/r_erf.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Id: r_erf.c,v 1.2 2008/02/26 19:54:41 ragge Exp */ -/* $NetBSD: r_erf.c,v 1.1.1.2 2010/06/03 18:58:09 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -float erf_(x) -float *x; -{ -double erf(); -return( erf(*x) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/r_erfc.c b/external/bsd/pcc/dist/pcc-libs/libF77/r_erfc.c deleted file mode 100644 index 07a364e49f1b..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/r_erfc.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Id: r_erfc.c,v 1.2 2008/02/26 19:54:41 ragge Exp */ -/* $NetBSD: r_erfc.c,v 1.1.1.2 2010/06/03 18:58:09 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -float erfc_(x) -float *x; -{ -double erfc(); -return( erfc(*x) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/r_exp.c b/external/bsd/pcc/dist/pcc-libs/libF77/r_exp.c deleted file mode 100644 index 73b016dbe697..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/r_exp.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Id: r_exp.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: r_exp.c,v 1.1.1.2 2010/06/03 18:58:09 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double -r_exp(float *x) -{ - return( exp(*x) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/r_imag.c b/external/bsd/pcc/dist/pcc-libs/libF77/r_imag.c deleted file mode 100644 index 9dc237d6189c..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/r_imag.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Id: r_imag.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: r_imag.c,v 1.1.1.2 2010/06/03 18:58:09 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -double -r_imag(complex *z) -{ - return(z->imag); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/r_int.c b/external/bsd/pcc/dist/pcc-libs/libF77/r_int.c deleted file mode 100644 index cdb905c22195..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/r_int.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Id: r_int.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: r_int.c,v 1.1.1.2 2010/06/03 18:58:09 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -double -r_int(float *x) -{ - return( (long int) (*x) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/r_lg10.c b/external/bsd/pcc/dist/pcc-libs/libF77/r_lg10.c deleted file mode 100644 index d17c78107854..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/r_lg10.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Id: r_lg10.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: r_lg10.c,v 1.1.1.2 2010/06/03 18:58:09 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double -r_lg10(float *x) -{ - - return( M_LOG10E * log(*x) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/r_log.c b/external/bsd/pcc/dist/pcc-libs/libF77/r_log.c deleted file mode 100644 index 04e4b3a9cdcc..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/r_log.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Id: r_log.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: r_log.c,v 1.1.1.2 2010/06/03 18:58:09 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double -r_log(float *x) -{ - return( log(*x) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/r_mod.c b/external/bsd/pcc/dist/pcc-libs/libF77/r_mod.c deleted file mode 100644 index f5d7e0ab1774..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/r_mod.c +++ /dev/null @@ -1,42 +0,0 @@ -/* Id: r_mod.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: r_mod.c,v 1.1.1.2 2010/06/03 18:58:09 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -double -r_mod(float *x,float *y) -{ - return(*x - (*y) * ( (long int) (*x / *y)) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/r_nint.c b/external/bsd/pcc/dist/pcc-libs/libF77/r_nint.c deleted file mode 100644 index 3e4f4683c479..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/r_nint.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Id: r_nint.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: r_nint.c,v 1.1.1.2 2010/06/03 18:58:09 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -double -r_nint(float *x) -{ - return( (*x)>=0 ? - (long int) (*x + .5) : (long int) (*x - .5) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/r_sign.c b/external/bsd/pcc/dist/pcc-libs/libF77/r_sign.c deleted file mode 100644 index 1526e556746a..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/r_sign.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Id: r_sign.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: r_sign.c,v 1.1.1.2 2010/06/03 18:58:09 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -double -r_sign(float *a,float *b) -{ - float x; - - x = (*a >= 0 ? *a : - *a); - return( *b >= 0 ? x : -x); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/r_sin.c b/external/bsd/pcc/dist/pcc-libs/libF77/r_sin.c deleted file mode 100644 index e2b25b15c6c6..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/r_sin.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Id: r_sin.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: r_sin.c,v 1.1.1.2 2010/06/03 18:58:09 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double -r_sin(float *x) -{ - return( sin(*x) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/r_sinh.c b/external/bsd/pcc/dist/pcc-libs/libF77/r_sinh.c deleted file mode 100644 index 9e28d3224ed2..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/r_sinh.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Id: r_sinh.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: r_sinh.c,v 1.1.1.2 2010/06/03 18:58:09 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double -r_sinh(float *x) -{ - return( sinh(*x) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/r_sqrt.c b/external/bsd/pcc/dist/pcc-libs/libF77/r_sqrt.c deleted file mode 100644 index 2cfbdbe70a16..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/r_sqrt.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Id: r_sqrt.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: r_sqrt.c,v 1.1.1.2 2010/06/03 18:58:09 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double -r_sqrt(float *x) -{ - return( sqrt(*x) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/r_tan.c b/external/bsd/pcc/dist/pcc-libs/libF77/r_tan.c deleted file mode 100644 index 1314b05a8ee1..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/r_tan.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Id: r_tan.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: r_tan.c,v 1.1.1.2 2010/06/03 18:58:09 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double -r_tan(float *x) -{ - return( tan(*x) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/r_tanh.c b/external/bsd/pcc/dist/pcc-libs/libF77/r_tanh.c deleted file mode 100644 index a5a63a027805..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/r_tanh.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Id: r_tanh.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: r_tanh.c,v 1.1.1.2 2010/06/03 18:58:09 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double -r_tanh(float *x) -{ - return( tanh(*x) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/s_cat.c b/external/bsd/pcc/dist/pcc-libs/libF77/s_cat.c deleted file mode 100644 index 7e0fab33a7ef..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/s_cat.c +++ /dev/null @@ -1,56 +0,0 @@ -/* Id: s_cat.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: s_cat.c,v 1.1.1.2 2010/06/03 18:58:09 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -void -s_cat(char *lp, char *rpp[], long int rnp[], long int *np, long int ll) -{ - int i, n, nc; - char *rp; - - n = *np; - for(i = 0 ; i < n ; ++i) { - nc = ll; - if(rnp[i] < nc) - nc = rnp[i]; - ll -= nc; - rp = rpp[i]; - while(--nc >= 0) - *lp++ = *rp++; - } - while(--ll >= 0) - *lp++ = ' '; -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/s_cmp.c b/external/bsd/pcc/dist/pcc-libs/libF77/s_cmp.c deleted file mode 100644 index f04c6687d013..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/s_cmp.c +++ /dev/null @@ -1,67 +0,0 @@ -/* Id: s_cmp.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: s_cmp.c,v 1.1.1.2 2010/06/03 18:58:09 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -int -s_cmp(char *a, char *b, long int la, long int lb) /* compare two strings */ -{ - char *aend, *bend; - - aend = a + la; - - if(la <= lb) { - while(a < aend) - if(*a != *b) - return( *a - *b ); - else { - ++a; ++b; - } - - } else { - bend = b + lb; - while(b < bend) - if(*a == *b) { - ++a; ++b; - } else - return( *a - *b ); - while(a < aend) - if(*a != ' ') - return(*a - ' '); - else - ++a; - } - return(0); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/s_copy.c b/external/bsd/pcc/dist/pcc-libs/libF77/s_copy.c deleted file mode 100644 index 288742eb7e0a..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/s_copy.c +++ /dev/null @@ -1,56 +0,0 @@ -/* Id: s_copy.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: s_copy.c,v 1.1.1.2 2010/06/03 18:58:09 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "f77lib.h" - -void -s_copy(char *a, char *b, long int la, long int lb) /* assign strings: a = b */ -{ - char *aend, *bend; - - aend = a + la; - - if(la <= lb) { - while(a < aend) - *a++ = *b++; - - } else { - bend = b + lb; - while(b < bend) - *a++ = *b++; - while(a < aend) - *a++ = ' '; - } -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/s_paus.c b/external/bsd/pcc/dist/pcc-libs/libF77/s_paus.c deleted file mode 100644 index 4d8a6b95790b..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/s_paus.c +++ /dev/null @@ -1,78 +0,0 @@ -/* Id: s_paus.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: s_paus.c,v 1.1.1.2 2010/06/03 18:58:10 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 -#include -#include -#include - -#include "f77lib.h" - -#define PAUSESIG 15 - -static void waitpause(int); - -void -s_paus(char *s, long int n) -{ - int i; - - fprintf(stderr, "PAUSE "); - if(n > 0) - for(i = 0; i -#include - -#include "f77lib.h" - -/* called when a subscript is out of range */ - -void -s_rnge(char *varn, long int offset, char *procn, int line) -{ - register int i; - - fprintf(stderr, "Subscript out of range on file line %d, procedure ", - line); - for(i = 0 ; i < 8 && *procn!='_' ; ++i) - putc(*procn++, stderr); - fprintf(stderr, ".\nAttempt to access the %ld-th element of variable ", - offset+1); - for(i = 0 ; i < 6 && *varn!=' ' ; ++i) - putc(*varn++, stderr); - fprintf(stderr, ".\n"); - abort(); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/s_stop.c b/external/bsd/pcc/dist/pcc-libs/libF77/s_stop.c deleted file mode 100644 index d8413db1a40c..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/s_stop.c +++ /dev/null @@ -1,54 +0,0 @@ -/* Id: s_stop.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: s_stop.c,v 1.1.1.2 2010/06/03 18:58:10 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 -#include - -#include "f77lib.h" - -void -s_stop(char *s, long int n) -{ - int i; - - if(n > 0) { - fprintf(stderr, "STOP "); - for(i = 0; i - -#include "f77lib.h" - -void (* -signal_(int *sigp, void (**procp)(int)))(int) -{ - void (*proc)(int); - int sig; - - sig = *sigp; - proc = *procp; - - return( signal(sig, proc) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/sinh.c b/external/bsd/pcc/dist/pcc-libs/libF77/sinh.c deleted file mode 100644 index daa1c16db828..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/sinh.c +++ /dev/null @@ -1,106 +0,0 @@ -/* Id: sinh.c,v 1.2 2008/02/26 19:54:41 ragge Exp */ -/* $NetBSD: sinh.c,v 1.1.1.2 2010/06/03 18:58:10 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -/* - sinh(arg) returns the hyperbolic sign of its floating- - point argument. - - The exponential function is called for arguments - greater in magnitude than 0.5. - The result overflows and 'huge' is returned for - arguments greater than somewhat. - - A series is used for arguments smaller in magnitude than 0.5. - The coeffieients are #2029 from Hart & Cheney. (20.36D) - - cosh(arg) is computed from the exponential function for - all arguments. -*/ - -double exp(); - -static double p0 -0.6307673640497716991184787251e+6; -static double p1 -0.8991272022039509355398013511e+5; -static double p2 -0.2894211355989563807284660366e+4; -static double p3 -0.2630563213397497062819489e+2; -static double q0 -0.6307673640497716991212077277e+6; -static double q1 0.1521517378790019070696485176e+5; -static double q2 -0.173678953558233699533450911e+3; -static double q3 1.0; - -double -sinh(arg) double arg; { - - double sign, temp, argsq; - - sign = 1; - if(arg < 0){ - arg = - arg; - sign = -1; - } - - if(arg > 21.){ - temp = exp(arg)/2; - return(sign*temp); - } - - if(arg > 0.5) { - temp = (exp(arg) - exp(-arg))/2; - return(sign*temp); - } - - argsq = arg*arg; - temp = (((p3*argsq+p2)*argsq+p1)*argsq+p0)*arg; - temp = temp/(((q3*argsq+q2)*argsq+q1)*argsq+q0); - return(sign*temp); - -} - -double -cosh(arg) double arg; { - - double temp; - - if(arg < 0) - arg = - arg; - - if(arg > 21.){ - temp = exp(arg)/2; - return(temp); - } - - temp = (exp(arg) + exp(-arg))/2; - return(temp); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/tanh.c b/external/bsd/pcc/dist/pcc-libs/libF77/tanh.c deleted file mode 100644 index 06b6beb2333f..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/tanh.c +++ /dev/null @@ -1,62 +0,0 @@ -/* Id: tanh.c,v 1.2 2008/02/26 19:54:41 ragge Exp */ -/* $NetBSD: tanh.c,v 1.1.1.2 2010/06/03 18:58:10 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -/* - tanh(arg) computes the hyperbolic tangent of its floating - point argument. - - sinh and cosh are called except for large arguments, which - would cause overflow improperly. -*/ - -double sinh(), cosh(); - -double -tanh(arg) double arg; { - - double sign; - - sign = 1.; - if(arg < 0.){ - arg = -arg; - sign = -1.; - } - - if(arg > 21.){ - return(sign); - } - - return(sign*sinh(arg)/cosh(arg)); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/z_abs.c b/external/bsd/pcc/dist/pcc-libs/libF77/z_abs.c deleted file mode 100644 index 27ca305339f1..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/z_abs.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Id: z_abs.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: z_abs.c,v 1.1.1.2 2010/06/03 18:58:10 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -double -z_abs(dcomplex *z) -{ - - return( fcabs( z->dreal, z->dimag ) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/z_cos.c b/external/bsd/pcc/dist/pcc-libs/libF77/z_cos.c deleted file mode 100644 index c3ba4028c4d5..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/z_cos.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Id: z_cos.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: z_cos.c,v 1.1.1.2 2010/06/03 18:58:10 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -void -z_cos(dcomplex *r, dcomplex *z) -{ - - r->dreal = cos(z->dreal) * cosh(z->dimag); - r->dimag = - sin(z->dreal) * sinh(z->dimag); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/z_div.c b/external/bsd/pcc/dist/pcc-libs/libF77/z_div.c deleted file mode 100644 index 7f228609189e..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/z_div.c +++ /dev/null @@ -1,68 +0,0 @@ -/* Id: z_div.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: z_div.c,v 1.1.1.2 2010/06/03 18:58:10 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -void -z_div(dcomplex *c, dcomplex *a, dcomplex *b) -{ -double ratio, den; -double abr, abi; - -if( (abr = b->dreal) < 0.) - abr = - abr; -if( (abi = b->dimag) < 0.) - abi = - abi; -if( abr <= abi ) - { - if(abi == 0) - abort(); /* fatal("complex division by zero"); */ - ratio = b->dreal / b->dimag ; - den = b->dimag * (1 + ratio*ratio); - c->dreal = (a->dreal*ratio + a->dimag) / den; - c->dimag = (a->dimag*ratio - a->dreal) / den; - } - -else - { - ratio = b->dimag / b->dreal ; - den = b->dreal * (1 + ratio*ratio); - c->dreal = (a->dreal + a->dimag*ratio) / den; - c->dimag = (a->dimag - a->dreal*ratio) / den; - } - -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/z_exp.c b/external/bsd/pcc/dist/pcc-libs/libF77/z_exp.c deleted file mode 100644 index 22bf5575f8d0..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/z_exp.c +++ /dev/null @@ -1,48 +0,0 @@ -/* Id: z_exp.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: z_exp.c,v 1.1.1.2 2010/06/03 18:58:10 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -void -z_exp(dcomplex *r, dcomplex *z) -{ - double expx; - - expx = exp(z->dreal); - r->dreal = expx * cos(z->dimag); - r->dimag = expx * sin(z->dimag); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/z_log.c b/external/bsd/pcc/dist/pcc-libs/libF77/z_log.c deleted file mode 100644 index 2647a1814826..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/z_log.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Id: z_log.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: z_log.c,v 1.1.1.2 2010/06/03 18:58:10 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -void -z_log(dcomplex *r, dcomplex *z) -{ - - r->dimag = atan2(z->dimag, z->dreal); - r->dreal = log( fcabs( z->dreal, z->dimag ) ); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/z_sin.c b/external/bsd/pcc/dist/pcc-libs/libF77/z_sin.c deleted file mode 100644 index 906fb69c11dd..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/z_sin.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Id: z_sin.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: z_sin.c,v 1.1.1.2 2010/06/03 18:58:10 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -void -z_sin(dcomplex *r, dcomplex *z) -{ - - r->dreal = sin(z->dreal) * cosh(z->dimag); - r->dimag = cos(z->dreal) * sinh(z->dimag); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libF77/z_sqrt.c b/external/bsd/pcc/dist/pcc-libs/libF77/z_sqrt.c deleted file mode 100644 index 7a04e6ba8ee7..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libF77/z_sqrt.c +++ /dev/null @@ -1,56 +0,0 @@ -/* Id: z_sqrt.c,v 1.3 2008/02/28 16:48:50 ragge Exp */ -/* $NetBSD: z_sqrt.c,v 1.1.1.2 2010/06/03 18:58:10 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "f77lib.h" - -void -z_sqrt(dcomplex *r, dcomplex *z) -{ - double mag; - - if( (mag = fcabs(z->dreal, z->dimag)) == 0.) - r->dreal = r->dimag = 0.; - else if(z->dreal > 0) { - r->dreal = sqrt(0.5 * (mag + z->dreal) ); - r->dimag = z->dimag / r->dreal / 2; - } else { - r->dimag = sqrt(0.5 * (mag - z->dreal) ); - if(z->dimag < 0) - z->dimag = - z->dimag; - r->dreal = z->dimag / r->dimag / 2; - } -} diff --git a/external/bsd/pcc/dist/pcc-libs/libI77/Makefile b/external/bsd/pcc/dist/pcc-libs/libI77/Makefile deleted file mode 100755 index 781ca636e1b6..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libI77/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# -# Simple makefile for the F77 I/O library. -# - -CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes - -.c.o : - cc -O $(CFLAGS) -c $< - -ld -r -x $*.o - mv a.out $*.o - -OBJS= backspace.o dfe.o due.o iio.o inquire.o lib.o rewind.o rsfe.o rdfmt.o \ - sue.o uio.o wsfe.o sfe.o fmt.o lio.o lread.o open.o close.o \ - util.o endfile.o wrtfmt.o err.o fmtlib.o - -libI77.a: $(OBJS) - ar r libI77.a $? - -clean: - /bin/rm -f $(OBJS) libI77.a diff --git a/external/bsd/pcc/dist/pcc-libs/libI77/backspace.c b/external/bsd/pcc/dist/pcc-libs/libI77/backspace.c deleted file mode 100644 index e684290b4d4e..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libI77/backspace.c +++ /dev/null @@ -1,90 +0,0 @@ -/* Id: backspace.c,v 1.3 2008/03/01 13:44:12 ragge Exp */ -/* $NetBSD: backspace.c,v 1.1.1.2 2010/06/03 18:58:10 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "fio.h" - -int -f_back(alist *a) -{ - unit *b; - int n,i; - long x; - char buf[32]; - - if(a->aunit >= MXUNIT || a->aunit < 0) - err(a->aerr,101,"backspace") - b= &units[a->aunit]; - if(b->useek==0) err(a->aerr,106,"backspace") - if(b->ufd==NULL) err(a->aerr,114,"backspace") - if(b->uend==1) - { b->uend=0; - return(0); - } - if(b->uwrt) - { t_runc(b); - nowreading(b); - } - if(b->url>0) - { - x=ftell(b->ufd); - x /= b->url; - x *= b->url; - fseek(b->ufd,x,0); - return(0); - } - if(b->ufmt==0) - { fseek(b->ufd,-(long)sizeof(int),1); - fread((char *)&n,sizeof(int),1,b->ufd); - fseek(b->ufd,-(long)n-2*sizeof(int),1); - return(0); - } - for(;;) - { - x=ftell(b->ufd); - if(xufd,x,0); - n=fread(buf,1,sizeof(buf),b->ufd); - for(i=n-1;i>=0;i--) - { - if(buf[i]!='\n') continue; - fseek(b->ufd,(long)(i-n),1); - return(0); - } - if(x==0) return(0); - else if(n==0) err(a->aerr,(EOF),"backspace") - else err(a->aerr,errno,"backspace"); - } -} diff --git a/external/bsd/pcc/dist/pcc-libs/libI77/close.c b/external/bsd/pcc/dist/pcc-libs/libI77/close.c deleted file mode 100644 index 733ed9428196..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libI77/close.c +++ /dev/null @@ -1,93 +0,0 @@ -/* Id: close.c,v 1.3 2008/03/01 13:44:12 ragge Exp */ -/* $NetBSD: close.c,v 1.1.1.2 2010/06/03 18:58:10 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 -#include - -#include "fio.h" - -int -f_clos(cllist *a) -{ unit *b; - if(a->cunit >= MXUNIT) return(0); - b= &units[a->cunit]; - if(b->ufd==NULL) return(0); - b->uend=0; - if(a->csta!=0) - switch(*a->csta) - { - default: - keep: - case 'k': - if(b->uwrt) t_runc(b); - fclose(b->ufd); - if(b->ufnm!=0) free(b->ufnm); - b->ufnm=NULL; - b->ufd=NULL; - return(0); - case 'd': - delete: - fclose(b->ufd); - if(b->ufnm!=0) - { unlink(b->ufnm); /*SYSDEP*/ - free(b->ufnm); - } - b->ufnm=NULL; - b->ufd=NULL; - return(0); - } - else if(b->uscrtch==1) goto delete; - else goto keep; -} - -void -f_exit() -{ int i; - cllist xx; - xx.cerr=1; - xx.csta=NULL; - for(i=0;iuwrt) nowreading(curunit); - getn = y_getc; - doed = rd_ed; - doned = rd_ned; - dorevert = donewrec = y_err; - doend = y_rev; - if(pars_f(fmtbuf)<0) - err(a->cierr,100,"startio"); - fmt_bg(); - return(0); -} - -int -s_wdfe(cilist *a) -{ - int n; - if(!init) f_init(); - if((n=c_dfe(a,WRITE))) return(n); - reading=0; - if(!curunit->uwrt) nowwriting(curunit); - putn = y_putc; - doed = w_ed; - doned= w_ned; - dorevert = donewrec = y_err; - doend = y_rev; - if(pars_f(fmtbuf)<0) - err(a->cierr,100,"startwrt"); - fmt_bg(); - return(0); -} - -int -e_rdfe() -{ - en_fio(); - return(0); -} - -int -e_wdfe() -{ - en_fio(); - return(0); -} - -int -c_dfe(cilist *a, int flag) -{ - sequential=0; - formatted=external=1; - elist=a; - cursor=scale=recpos=0; - if(a->ciunit>MXUNIT || a->ciunit<0) - err(a->cierr,101,"startchk"); - curunit = &units[a->ciunit]; - if(curunit->ufd==NULL && fk_open(flag,DIR,FMT,a->ciunit)) - err(a->cierr,104,"dfe"); - cf=curunit->ufd; - if(!curunit->ufmt) err(a->cierr,102,"dfe") - if(!curunit->useek) err(a->cierr,104,"dfe") - fmtbuf=a->cifmt; - fseek(cf,(long)curunit->url * (a->cirec-1),0); - curunit->uend = 0; - return(0); -} - -int -y_getc() -{ - int ch; - if(curunit->uend) return(-1); - if((ch=getc(cf))!=EOF) - { - recpos++; - if(curunit->url>=recpos || - curunit->url==1) - return(ch); - else return(' '); - } - if(feof(cf)) - { - curunit->uend=1; - errno=0; - return(-1); - } - err(elist->cierr,errno,"readingd"); -} - -int -y_putc(int c) -{ - recpos++; - if(recpos <= curunit->url || curunit->url==1) - putc(c,cf); - else - err(elist->cierr,110,"dout"); - return(0); -} - -int -y_rev() -{ /*what about work done?*/ - if(curunit->url==1 || recpos==curunit->url) - return(0); - while(recposurl) - (*putn)(' '); - recpos=0; - return(0); -} - -int -y_err() -{ - err(elist->cierr, 110, "dfe"); - return 0; /* XXX */ -} diff --git a/external/bsd/pcc/dist/pcc-libs/libI77/due.c b/external/bsd/pcc/dist/pcc-libs/libI77/due.c deleted file mode 100644 index 57d23e7fa3bd..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libI77/due.c +++ /dev/null @@ -1,93 +0,0 @@ -/* Id: due.c,v 1.3 2008/03/01 13:44:12 ragge Exp */ -/* $NetBSD: due.c,v 1.1.1.2 2010/06/03 18:58:11 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "fio.h" - -int -s_rdue(cilist *a) -{ - int n; - if((n=c_due(a,READ))) return(n); - reading=1; - if(curunit->uwrt) nowreading(curunit); - return(0); -} - -int -s_wdue(cilist *a) -{ - int n; - if((n=c_due(a,WRITE))) return(n); - reading=0; - if(!curunit->uwrt) nowwriting(curunit); - return(0); -} - -int -c_due(cilist *a, int flag) -{ - if(!init) f_init(); - if(a->ciunit>=MXUNIT || a->ciunit<0) - err(a->cierr,101,"startio"); - recpos=sequential=formatted=0; - external=1; - curunit = &units[a->ciunit]; - elist=a; - if(curunit->ufd==NULL && fk_open(flag,DIR,UNF,a->ciunit) ) err(a->cierr,104,"due"); - cf=curunit->ufd; - if(curunit->ufmt) err(a->cierr,102,"cdue") - if(!curunit->useek) err(a->cierr,104,"cdue") - if(curunit->ufd==NULL) err(a->cierr,114,"cdue") - fseek(cf,(long)(a->cirec-1)*curunit->url,0); - curunit->uend = 0; - return(0); -} - -int -e_rdue() -{ - if(curunit->url==1 || recpos==curunit->url) - return(0); - fseek(cf,(long)(curunit->url-recpos),1); - if(ftell(cf)%curunit->url) - err(elist->cierr,200,"syserr"); - return(0); -} - -int -e_wdue() -{ - return(e_rdue()); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libI77/endfile.c b/external/bsd/pcc/dist/pcc-libs/libI77/endfile.c deleted file mode 100644 index eeeeb2344655..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libI77/endfile.c +++ /dev/null @@ -1,102 +0,0 @@ -/* Id: endfile.c,v 1.4 2008/05/04 10:38:33 ragge Exp */ -/* $NetBSD: endfile.c,v 1.1.1.2 2010/06/03 18:58:11 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include -#include -#include - -#include "fio.h" -static alist *ax; - -int -f_end(alist *a) -{ - unit *b; - if(a->aunit>=MXUNIT || a->aunit<0) err(a->aerr,101,"endfile"); - b = &units[a->aunit]; - if(b->ufd==NULL) return(0); - b->uend=1; - if( b->useek==0) return(0); - ax=a; - if(b->uwrt) nowreading(b); - return(t_runc(b)); -} - -int -t_runc(unit *b) -{ - char buf[128],nm[16]; - FILE *tmp; - int n,m, fd; - long loc,len; - - if(b->url) return(0); /*don't truncate direct files*/ - loc=ftell(b->ufd); - fseek(b->ufd,0L,2); - len=ftell(b->ufd); - if(loc==len || b->useek==0 || b->ufnm==NULL) return(0); - strcpy(nm,"tmp.FXXXXXX"); - if(b->uwrt) nowreading(b); - fd = mkstemp(nm); - tmp=fdopen(fd,"w"); - fseek(b->ufd,0L,0); - for(;loc>0;) - { - n=fread(buf,1,loc>128?128:(int)loc,b->ufd); - if(n>loc) n=loc; - loc -= n; - fwrite(buf,1,n,tmp); - } - fflush(tmp); - for(n=0;n<10;n++) - { - if((m=fork())==-1) continue; - else if(m==0) - { - execl("/bin/cp","cp",nm,b->ufnm,NULL); - execl("/usr/bin/cp","cp",nm,b->ufnm,NULL); - fprintf(stdout,"no cp\n"); - exit(1); - } - wait(&m); - if(m!=0) err(ax->aerr,111,"endfile"); - fclose(tmp); - unlink(nm); - return(0); - } - err(ax->aerr,111,"endfile"); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libI77/err.c b/external/bsd/pcc/dist/pcc-libs/libI77/err.c deleted file mode 100644 index a64a883fd8de..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libI77/err.c +++ /dev/null @@ -1,160 +0,0 @@ -/* Id: err.c,v 1.3 2008/03/01 13:44:12 ragge Exp */ -/* $NetBSD: err.c,v 1.1.1.2 2010/06/03 18:58:11 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 -#include - -#include -#include -#include - -#include "fio.h" - -#define STR(x) (x==NULL?"":x) - -/*global definitions*/ -unit units[MXUNIT]; /*unit table*/ -flag init; /*0 on entry, 1 after initializations*/ -cilist *elist; /*active external io list*/ -flag reading; /*1 if reading, 0 if writing*/ -flag cplus,cblank; -char *fmtbuf; -flag external; /*1 if external io, 0 if internal */ -int (*doed)(struct syl *p, void *ptr, ftnlen len); -int (*doend)(void),(*donewrec)(void),(*dorevert)(void); -flag sequential; /*1 if sequential io, 0 if direct*/ -flag formatted; /*1 if formatted io, 0 if unformatted*/ -int (*getn)(void),(*putn)(int); /*for formatted io*/ -FILE *cf; /*current file*/ -unit *curunit; /*current unit*/ -int recpos; /*place in current record*/ -int cursor,scale; - -int canseek(FILE *f); - -/*error messages*/ -char *F_err[] = -{ - "error in format", - "illegal unit number", - "formatted io not allowed", - "unformatted io not allowed", - "direct io not allowed", - "sequential io not allowed", - "can't backspace file", - "null file name", - "can't stat file", - "unit not connected", - "off end of record", - "truncation failed in endfile", - "incomprehensible list input", - "out of free space", - "unit not connected", - "read unexpected character", - "blank logical input field", -}; -#define MAXERR (sizeof(F_err)/sizeof(char *)+100) - -void -fatal(int n, char *s) -{ - if(n<100 && n>=0) perror(s); /*SYSDEP*/ - else if(n>=(int)MAXERR) - { fprintf(stderr,"%s: illegal error number %d\n",s,n); - } - else if(n<0) fprintf(stderr,"%s: end of file %d\n",s,n); - else - fprintf(stderr,"%s: %s\n",s,F_err[n-100]); - fprintf(stderr,"apparent state: unit %d named %s\n",curunit-units, - STR(curunit->ufnm)); - fprintf(stderr,"last format: %s\n",STR(fmtbuf)); - fprintf(stderr,"lately %s %s %s %s IO\n",reading?"reading":"writing", - sequential?"sequential":"direct",formatted?"formatted":"unformatted", - external?"external":"internal"); - abort(); -} - -/*initialization routine*/ -void -f_init() -{ unit *p; - init=1; - p= &units[0]; - p->ufd=stderr; - p->useek=canseek(stderr); - p->ufmt=1; - p->uwrt=1; - p = &units[5]; - p->ufd=stdin; - p->useek=canseek(stdin); - p->ufmt=1; - p->uwrt=0; - p= &units[6]; - p->ufd=stdout; - p->useek=canseek(stdout); - p->ufmt=1; - p->uwrt=1; -} - -int -canseek(FILE *f) /*SYSDEP*/ -{ struct stat x; - fstat(fileno(f),&x); - if(x.st_nlink > 0 /*pipe*/ && !isatty(fileno(f))) - { - return(1); - } - return(0); -} - -int -nowreading(unit *x) -{ - long loc; - x->uwrt=0; - loc=ftell(x->ufd); - freopen(x->ufnm,"r",x->ufd); - return fseek(x->ufd,loc,0); -} - -int -nowwriting(x) unit *x; -{ - long loc; - loc=ftell(x->ufd); - x->uwrt=1; - freopen(x->ufnm,"a",x->ufd); - return fseek(x->ufd,loc,0); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libI77/fio.h b/external/bsd/pcc/dist/pcc-libs/libI77/fio.h deleted file mode 100644 index fc062b8b70f4..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libI77/fio.h +++ /dev/null @@ -1,214 +0,0 @@ -/* Id: fio.h,v 1.3 2008/03/01 13:44:12 ragge Exp */ -/* $NetBSD: fio.h,v 1.1.1.2 2010/06/03 18:58:11 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 -typedef long ftnint; -typedef ftnint flag; -typedef long ftnlen; -/*external read, write*/ -typedef struct -{ flag cierr; - ftnint ciunit; - flag ciend; - char *cifmt; - ftnint cirec; -} cilist; -/*internal read, write*/ -typedef struct -{ flag icierr; - char *iciunit; - flag iciend; - char *icifmt; - ftnint icirlen; - ftnint icirnum; -} icilist; -/*open*/ -typedef struct -{ flag oerr; - ftnint ounit; - char *ofnm; - ftnlen ofnmlen; - char *osta; - char *oacc; - char *ofm; - ftnint orl; - char *oblnk; -} olist; -/*close*/ -typedef struct -{ flag cerr; - ftnint cunit; - char *csta; -} cllist; -/*rewind, backspace, endfile*/ -typedef struct -{ flag aerr; - ftnint aunit; -} alist; -/*units*/ -typedef struct -{ FILE *ufd; /*0=unconnected*/ - char *ufnm; - long uinode; - int url; /*0=sequential*/ - flag useek; /*true=can backspace, use dir, ...*/ - flag ufmt; - flag uprnt; - flag ublnk; - flag uend; - flag uwrt; /*last io was write*/ - flag uscrtch; -} unit; -typedef struct -{ flag inerr; - ftnint inunit; - char *infile; - ftnlen infilen; - ftnint *inex; /*parameters in standard's order*/ - ftnint *inopen; - ftnint *innum; - ftnint *innamed; - char *inname; - ftnlen innamlen; - char *inacc; - ftnlen inacclen; - char *inseq; - ftnlen inseqlen; - char *indir; - ftnlen indirlen; - char *infmt; - ftnlen infmtlen; - char *inform; - ftnint informlen; - char *inunf; - ftnlen inunflen; - ftnint *inrecl; - ftnint *innrec; - char *inblank; - ftnlen inblanklen; -} inlist; - -extern int errno; -extern flag init; -extern cilist *elist; /*active external io list*/ -extern flag reading,external,sequential,formatted; -extern int (*getn)(void),(*putn)(int); /*for formatted io*/ -extern FILE *cf; /*current file*/ -extern unit *curunit; /*current unit*/ -extern unit units[]; -#define err(f,n,s) {if(f) errno= n; else fatal(n,s); return(n);} - -/*Table sizes*/ -#define MXUNIT 10 - -extern int recpos; /*position in current record*/ - -#define WRITE 1 -#define READ 2 -#define SEQ 3 -#define DIR 4 -#define FMT 5 -#define UNF 6 -#define EXT 7 -#define INT 8 - -/* forward decl's */ -struct syl; - -/* function prototypes */ -void fatal(int n, char *s); -int t_runc(unit *b); -int nowreading(unit *x); -int f_back(alist *a); -int rd_ed(struct syl *p, void *ptr, ftnlen len); -int rd_ned(struct syl *p, char *ptr); -int w_ed(struct syl *p, void *ptr, ftnlen len); -int w_ned(struct syl *p, char *ptr); -int s_rdfe(cilist *a); -void f_init(void); -int pars_f(char *); -void fmt_bg(void); -int s_wdfe(cilist *a); -int e_rdfe(void); -int e_wdfe(void); -int nowwriting(unit *); -int en_fio(void); -int do_fio(ftnint *number, char *ptr, ftnlen len); -int fk_open(int rd,int seq,int fmt, ftnint n); -int s_rdue(cilist *a); -int s_wdue(cilist *a); -int c_due(cilist *a, int flag); -int e_rdue(void); -int e_wdue(void); -int z_getc(void); -int z_putc(int); -int s_rsfi(icilist *a); -int s_wsfi(icilist *a); -int e_rsfi(void); -int e_wsfi(void); -int f_inqu(inlist *a); -void g_char(char *a, ftnlen alen, char *b); -void b_char(char *a, char *b, ftnlen blen); -int inode(char *a); -void setcilist(cilist *x, int u, char *fmt,int rec,int xerr,int end); -void setolist(olist *, int, char *, char *, char *, int, char *, int); -void stcllist(cllist *x, int xunit, char *stat, int cerr); -void setalist(alist *x, int xunit, int aerr); -int f_rew(alist *a); -int s_rsfe(cilist *a); -int c_sfe(cilist *a, int flag); -int s_rsue(cilist *a); -int s_wsue(cilist *a); -int e_rsue(void); -int e_wsue(void); -int do_uio(ftnint *number, char *ptr, ftnlen len); -int s_wsfe(cilist *a); -void pr_put(int); -int e_rsfe(void); -int e_wsfe(void); -int c_le(cilist *a, int flag); -int e_wsle(void); -int s_wsle(cilist *a); -int wrt_L(ftnint *n, int len); -int s_rsle(cilist *a); -int e_rsle(void); -int f_open(olist *a); -int f_clos(cllist *a); -void f_exit(void); -void flush_(void); -int fullpath(char *a,char *b, int errflag); -int f_end(alist *); -char *icvt(long value,int *ndigit,int *sign); - diff --git a/external/bsd/pcc/dist/pcc-libs/libI77/fmt.c b/external/bsd/pcc/dist/pcc-libs/libI77/fmt.c deleted file mode 100644 index faa224886060..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libI77/fmt.c +++ /dev/null @@ -1,447 +0,0 @@ -/* Id: fmt.c,v 1.3 2008/03/01 13:44:12 ragge Exp */ -/* $NetBSD: fmt.c,v 1.1.1.2 2010/06/03 18:58:11 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "fio.h" -#include "fmt.h" - -static int type_f(int); -static int ne_d(char *s,char **p); -static int e_d(char *s,char **p); -static int op_gen(int a,int b,int c,int d); -static char *ap_end(char *s); - -#define skip(s) while(*s==' ') s++ -#define SYLMX 300 -#define GLITCH '\2' - /* special quote character for stu */ -extern int cursor,scale; -extern flag cblank,cplus; /*blanks in I and compulsory plus*/ -struct syl syl[SYLMX]; -int parenlvl,pc,revloc; -static char *f_s(char *s, int curloc),*f_list(char *), - *i_tem(char *),*gt_num(char *s, int *n); -int -pars_f(s) char *s; -{ - parenlvl=revloc=pc=0; - if((s=f_s(s,0))==NULL) - { - return(-1); - } - return(0); -} - -char * -f_s(char *s, int curloc) -{ - skip(s); - if(*s++!='(') - { - return(NULL); - } - if(parenlvl++ ==1) revloc=curloc; - if(op_gen(RET,curloc,0,0)<0 || - (s=f_list(s))==NULL) - { - return(NULL); - } - skip(s); - return(s); -} -char * -f_list(char *s) -{ - for(;*s!=0;) - { skip(s); - if((s=i_tem(s))==NULL) return(NULL); - skip(s); - if(*s==',') s++; - else if(*s==')') - { if(--parenlvl==0) - { - op_gen(REVERT,revloc,0,0); - return(++s); - } - op_gen(GOTO,0,0,0); - return(++s); - } - } - return(NULL); -} -char * -i_tem(char *s) -{ char *t; - int n,curloc; - if(*s==')') return(s); - if(ne_d(s,&t)) return(t); - if(e_d(s,&t)) return(t); - s=gt_num(s,&n); - if((curloc=op_gen(STACK,n,0,0))<0) return(NULL); - return(f_s(s,curloc)); -} - -int -ne_d(char *s,char **p) -{ int n,x,sign=0; - switch(*s) - { - default: return(0); - case ':': op_gen(COLON,0,0,0); break; - case 'b': - if(*++s=='z') op_gen(BZ,0,0,0); - else op_gen(BN,0,0,0); - break; - case 's': - if(*(s+1)=='s') - { x=SS; - s++; - } - else if(*(s+1)=='p') - { x=SP; - s++; - } - else x=S; - op_gen(x,0,0,0); - break; - case '/': op_gen(SLASH,0,0,0); break; - case '-': sign=1; s++; /*OUTRAGEOUS CODING TRICK*/ - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - s=gt_num(s,&n); - switch(*s) - { - default: return(0); - case 'p': if(sign) n= -n; op_gen(P,n,0,0); break; - case 'x': op_gen(X,n,0,0); break; - case 'H': - case 'h': op_gen(H,n,(int)(s+1),0); - s+=n; - break; - } - break; - case GLITCH: - case '"': - case '\'': op_gen(APOS,(int)s,0,0); - *p=ap_end(s); - return(1); - case 't': - if(*(s+1)=='l') - { x=TL; - s++; - } - else if(*(s+1)=='r') - { x=TR; - s++; - } - else x=T; - s=gt_num(s+1,&n); - op_gen(x,n,0,0); - break; - case 'x': op_gen(X,1,0,0); break; - case 'p': op_gen(P,1,0,0); break; - } - s++; - *p=s; - return(1); -} - -int -e_d(char *s,char **p) -{ int n,w,d,e,found=0,x=0; - char *sv=s; - s=gt_num(s,&n); - op_gen(STACK,n,0,0); - switch(*s++) - { - default: break; - case 'e': x=1; - case 'g': - found=1; - s=gt_num(s,&w); - if(w==0) break; - if(*s=='.') - { s++; - s=gt_num(s,&d); - } - else d=0; - if(*s!='E') - op_gen(x==1?E:G,w,d,0); - else - { s++; - s=gt_num(s,&e); - op_gen(x==1?EE:GE,w,d,e); - } - break; - case 'l': - found=1; - s=gt_num(s,&w); - if(w==0) break; - op_gen(L,w,0,0); - break; - case 'a': - found=1; - skip(s); - if(*s>='0' && *s<='9') - { s=gt_num(s,&w); - if(w==0) break; - op_gen(AW,w,0,0); - break; - } - op_gen(A,0,0,0); - break; - case 'f': - found=1; - s=gt_num(s,&w); - if(w==0) break; - if(*s=='.') - { s++; - s=gt_num(s,&d); - } - else d=0; - op_gen(F,w,d,0); - break; - case 'd': - found=1; - s=gt_num(s,&w); - if(w==0) break; - if(*s=='.') - { s++; - s=gt_num(s,&d); - } - else d=0; - op_gen(D,w,d,0); - break; - case 'i': - found=1; - s=gt_num(s,&w); - if(w==0) break; - if(*s!='.') - { op_gen(I,w,0,0); - break; - } - s++; - s=gt_num(s,&d); - op_gen(IM,w,d,0); - break; - } - if(found==0) - { pc--; /*unSTACK*/ - *p=sv; - return(0); - } - *p=s; - return(1); -} - -int -op_gen(int a,int b,int c,int d) -{ struct syl *p= &syl[pc]; - if(pc>=SYLMX) - { fprintf(stderr,"format too complicated:\n%s\n", - fmtbuf); - abort(); - } - p->op=a; - p->p1=b; - p->p2=c; - p->p3=d; - return(pc++); -} -char * -gt_num(char *s, int *n) -{ int m=0,cnt=0; - char c; - for(c= *s;;c = *s) - { if(c==' ') - { s++; - continue; - } - if(c>'9' || c<'0') break; - m=10*m+c-'0'; - cnt++; - s++; - } - if(cnt==0) *n=1; - else *n=m; - return(s); -} -#define STKSZ 10 -int cnt[STKSZ],ret[STKSZ],cp,rp; -flag workdone; - -int -en_fio() -{ ftnint one=1; - return(do_fio(&one,NULL,0l)); -} - -int -do_fio(ftnint *number, char *ptr, ftnlen len) -{ - struct syl *p; - int n,i; - for(i=0;i<*number;i++,ptr+=len) - { -loop: switch(type_f((p= &syl[pc])->op)) - { - default: - fprintf(stderr,"unknown code in do_fio: %d\n%s\n", - p->op,fmtbuf); - err(elist->cierr,100,"do_fio"); - case NED: - if((*doned)(p,ptr)) - { pc++; - goto loop; - } - pc++; - continue; - case ED: - if(cnt[cp]<=0) - { cp--; - pc++; - goto loop; - } - if(ptr==NULL) - return((*doend)()); - cnt[cp]--; - workdone=1; - if((n=(*doed)(p,ptr,len))>0) err(elist->cierr,errno,"fmt"); - if(n<0) err(elist->ciend,(EOF),"fmt"); - continue; - case STACK: - cnt[++cp]=p->p1; - pc++; - goto loop; - case RET: - ret[++rp]=p->p1; - pc++; - goto loop; - case GOTO: - if(--cnt[cp]<=0) - { cp--; - rp--; - pc++; - goto loop; - } - pc=1+ret[rp--]; - goto loop; - case REVERT: - rp=cp=0; - pc = p->p1; - if(ptr==NULL) - return((*doend)()); - if(!workdone) return(0); - if((n=(*dorevert)()) != 0) return(n); - goto loop; - case COLON: - if(ptr==NULL) - return((*doend)()); - pc++; - goto loop; - case S: - case SS: - cplus=0; - pc++; - goto loop; - case SP: - cplus = 1; - pc++; - goto loop; - case P: scale=p->p1; - pc++; - goto loop; - case BN: - cblank=0; - pc++; - goto loop; - case BZ: - cblank=1; - pc++; - goto loop; - } - } - return(0); -} - -void -fmt_bg() -{ - workdone=cp=rp=pc=cursor=0; - cnt[0]=ret[0]=0; -} - -int -type_f(n) -{ - switch(n) - { - default: - return(n); - case RET: - return(RET); - case REVERT: return(REVERT); - case GOTO: return(GOTO); - case STACK: return(STACK); - case X: - case SLASH: - case APOS: case H: - case T: case TL: case TR: - return(NED); - case F: - case I: - case IM: - case A: case AW: - case L: - case E: case EE: case D: - case G: case GE: - return(ED); - } -} -char * -ap_end(char *s) -{ char quote; - quote= *s++; - for(;*s;s++) - { if(*s!=quote) continue; - if(*++s!=quote) return(s); - } - if(elist->cierr) - errno= 100; - else - fatal(100,"bad string"); - return s; -} diff --git a/external/bsd/pcc/dist/pcc-libs/libI77/fmt.h b/external/bsd/pcc/dist/pcc-libs/libI77/fmt.h deleted file mode 100644 index 180f4f3aecb1..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libI77/fmt.h +++ /dev/null @@ -1,95 +0,0 @@ -/* Id: fmt.h,v 1.4 2008/05/04 10:38:33 ragge Exp */ -/* $NetBSD: fmt.h,v 1.1.1.2 2010/06/03 18:58:11 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -struct syl -{ int op,p1,p2,p3; -}; -#define RET 1 -#define REVERT 2 -#define GOTO 3 -#define X 4 -#define SLASH 5 -#define STACK 6 -#define I 7 -#define ED 8 -#define NED 9 -#define IM 10 -#define APOS 11 -#define H 12 -#define TL 13 -#define TR 14 -#define T 15 -#define COLON 16 -#define S 17 -#define SP 18 -#define SS 19 -#define P 20 -#define BN 21 -#define BZ 22 -#define F 23 -#define E 24 -#define EE 25 -#define D 26 -#define G 27 -#define GE 28 -#define L 29 -#define A 30 -#define AW 31 -extern struct syl syl[]; -extern int pc,parenlvl,revloc; -int (*doed)(struct syl *p, void *ptr, ftnlen len); -int (*doned)(struct syl *p, char *ptr); -int (*dorevert)(void),(*donewrec)(void),(*doend)(void); -extern flag cblank,cplus,workdone; -extern char *fmtbuf; -extern int scale; -typedef union -{ float pf; - double pd; -} ufloat; -typedef union -{ short is; - char ic; - long il; -} unint; -#define GET(x) if((x=(*getn)())<0) return(x) -#define VAL(x) (x!='\n'?x:' ') -#define PUT(x) (*putn)(x) -extern int cursor; - -/* prototypes */ -int wrt_E(ufloat *, int, int, int, ftnlen); -int wrt_F(ufloat *p, int w,int d, ftnlen len); - diff --git a/external/bsd/pcc/dist/pcc-libs/libI77/fmtlib.c b/external/bsd/pcc/dist/pcc-libs/libI77/fmtlib.c deleted file mode 100644 index e9522302387e..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libI77/fmtlib.c +++ /dev/null @@ -1,61 +0,0 @@ -/* Id: fmtlib.c,v 1.3 2008/03/01 13:44:12 ragge Exp */ -/* $NetBSD: fmtlib.c,v 1.1.1.2 2010/06/03 18:58:11 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "fio.h" - -#define MAXINTLENGTH 10 - -char * -icvt(long value,int *ndigit,int *sign) -{ static char buf[MAXINTLENGTH+1]; - register int i; - if(value>0) *sign=0; - else if(value<0) - { value = -value; - *sign= 1; - } - else - { *sign=0; - *ndigit=1; - buf[MAXINTLENGTH]='0'; - return(&buf[MAXINTLENGTH]); - } - for(i=MAXINTLENGTH-1;value>0;i--) - { *(buf+i)=(int)(value%10)+'0'; - value /= 10; - } - *ndigit=MAXINTLENGTH-1-i; - return(&buf[i+1]); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libI77/iio.c b/external/bsd/pcc/dist/pcc-libs/libI77/iio.c deleted file mode 100644 index 53c657e2580c..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libI77/iio.c +++ /dev/null @@ -1,146 +0,0 @@ -/* Id: iio.c,v 1.3 2008/03/01 13:44:12 ragge Exp */ -/* $NetBSD: iio.c,v 1.1.1.2 2010/06/03 18:58:11 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "fio.h" -#include "fmt.h" -char *icptr,*icend; -icilist *svic; -static int y_err(void), z_wnew(void), z_rnew(void), c_si(icilist *); -int icnum,icpos; - -int -z_getc() -{ - if(icptr >= icend) err(svic->iciend,(EOF),"endfile"); - if(icpos++ < svic->icirlen) - return(*icptr++); - else err(svic->icierr,110,"recend"); -} - -int -z_putc(int c) -{ - if(icptr >= icend) err(svic->icierr,110,"inwrite"); - if(icpos++ < svic->icirlen) - *icptr++ = c; - else err(svic->icierr,110,"recend"); - return(0); -} - -int -z_rnew() -{ - icptr = svic->iciunit + (++icnum)*svic->icirlen; - icpos = 0; - return 0; -} - -int -s_rsfi(icilist *a) -{ int n; - if((n=c_si(a))) return(n); - reading=1; - doed=rd_ed; - doned=rd_ned; - getn=z_getc; - dorevert = donewrec = y_err; - doend = z_rnew; - return(0); -} - -int -s_wsfi(icilist *a) -{ int n; - if((n=c_si(a))) return(n); - reading=0; - doed=w_ed; - doned=w_ned; - putn=z_putc; - dorevert = donewrec = y_err; - doend = z_wnew; - return(0); -} - -int -c_si(icilist *a) -{ - fmtbuf=a->icifmt; - if(pars_f(fmtbuf)<0) - err(a->icierr,100,"startint"); - fmt_bg(); - sequential=formatted=1; - external=0; - cblank=cplus=scale=0; - svic=a; - icnum=icpos=0; - icptr=svic->iciunit; - icend=icptr+svic->icirlen*svic->icirnum; - return(0); -} - -int -z_wnew() -{ - while(icpos++ < svic->icirlen) - *icptr++ = ' '; - icpos = 0; - icnum++; - return 0; -} - -int -e_rsfi() -{ int n; - n = en_fio(); - fmtbuf = NULL; - return(n); -} - -int -e_wsfi() -{ - int n; - n = en_fio(); - fmtbuf = NULL; - while(icpos++ < svic->icirlen) - *icptr++ = ' '; - return(n); -} - -int -y_err() -{ - err(elist->cierr, 110, "iio"); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libI77/inquire.c b/external/bsd/pcc/dist/pcc-libs/libI77/inquire.c deleted file mode 100644 index b13b0d540e43..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libI77/inquire.c +++ /dev/null @@ -1,124 +0,0 @@ -/* Id: inquire.c,v 1.3 2008/03/01 13:44:12 ragge Exp */ -/* $NetBSD: inquire.c,v 1.1.1.2 2010/06/03 18:58:11 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "fio.h" - -int -f_inqu(inlist *a) -{ - flag byfile,legal; - int i; - unit *p; - char buf[256]; - long x; - - x = 0; /* XXX - check correctness */ - if(a->infile!=NULL) { - byfile=1; - g_char(a->infile,a->infilen,buf); - x=inode(buf); - for(i=0,p=NULL;iinunitinunit>=0) { - legal=1; - p= &units[a->inunit]; - } else { - legal=0; - p=NULL; - } - } - if(a->inex!=NULL) { - if((byfile && x>0) || (!byfile && p!=NULL)) - *a->inex=1; - else *a->inex=0; - } - if(a->inopen!=NULL) { - if(byfile) *a->inopen=(p!=NULL); - else *a->inopen=(p!=NULL && p->ufd!=NULL); - } - if(a->innum!=NULL) *a->innum= p-units; - if(a->innamed!=NULL) { - if(byfile || (p!=NULL && p->ufnm!=NULL)) - *a->innamed=1; - else *a->innamed=0; - } - if(a->inname!=NULL) { - if(byfile) - b_char(buf,a->inname,a->innamlen); - else if(p!=NULL && p->ufnm!=NULL) - b_char(p->ufnm,a->inname,a->innamlen); - } - if(a->inacc!=NULL && p!=NULL && p->ufd!=NULL) { - if(p->url) - b_char("direct",a->inacc,a->inacclen); - else b_char("sequential",a->inacc,a->inacclen); - } - if(a->inseq!=NULL) { - if(byfile || (p!=NULL && p->useek)) - b_char("yes",a->inseq,a->inseqlen); - else b_char("no",a->inseq,a->inseqlen); - } - if(a->indir!=NULL) { - if(byfile || (p!=NULL && p->useek)) - b_char("yes",a->indir,a->indirlen); - else b_char("no",a->indir,a->indirlen); - } - if(a->infmt!=NULL) { - if(p!=NULL && p->ufmt) - b_char("formatted",a->infmt,a->infmtlen); - else if(p!=NULL) - b_char("unformatted",a->infmt,a->infmtlen); - } - if(a->inform!=NULL) - b_char("yes",a->inform,a->informlen); - if(a->inunf) { - if(byfile || (p!=NULL && p->useek)) - b_char("yes",a->inunf,a->inunflen); - else b_char("unknown",a->inunf,a->inunflen); - } - if(a->inrecl!=NULL && p!=NULL) - *a->inrecl=p->url; - if(a->innrec!=NULL && p!=NULL && p->url>0) - *a->innrec=ftell(p->ufd)/p->url+1; - if(a->inblank && p!=NULL && p->ufmt) { - if(p->ublnk) - b_char("zero",a->inblank,a->inblanklen); - else b_char("blank",a->inblank,a->inblanklen); - } - return(0); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libI77/lib.c b/external/bsd/pcc/dist/pcc-libs/libI77/lib.c deleted file mode 100644 index 744500038d3d..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libI77/lib.c +++ /dev/null @@ -1,77 +0,0 @@ -/* Id: lib.c,v 1.3 2008/03/01 13:44:12 ragge Exp */ -/* $NetBSD: lib.c,v 1.1.1.2 2010/06/03 18:58:11 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "fio.h" - -void -setcilist(cilist *x, int u, char *fmt,int rec,int xerr,int end) -{ - x->ciunit=u; - x->cifmt=fmt; - x->cirec=rec; - x->cierr=xerr; - x->ciend=end; -} - -void -setolist(olist *x, int xunit, char *fname, char *sta, char *fm, - int rl, char *blnk, int oerr) -{ - x->oerr=oerr; - x->ounit=xunit; - x->ofnm=fname; - x->ofnmlen=strlen(fname); - x->osta=sta; - x->ofm=fm; - x->orl=rl; - x->oblnk=blnk; -} - -void -stcllist(cllist *x, int xunit, char *stat, int cerr) -{ - x->cerr=cerr; - x->cunit=xunit; - x->csta=stat; -} - -void -setalist(alist *x, int xunit, int aerr) -{ - x->aunit=xunit; - x->aerr=aerr; -} diff --git a/external/bsd/pcc/dist/pcc-libs/libI77/lio.c b/external/bsd/pcc/dist/pcc-libs/libI77/lio.c deleted file mode 100644 index ec25dc6183be..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libI77/lio.c +++ /dev/null @@ -1,197 +0,0 @@ -/* Id: lio.c,v 1.3 2008/03/01 13:44:12 ragge Exp */ -/* $NetBSD: lio.c,v 1.1.1.2 2010/06/03 18:58:11 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "fio.h" -#include "fmt.h" -#include "lio.h" - -static int l_write(ftnint *number, flex *ptr,ftnlen len, ftnint type); -static int t_putc(int); -void lwrt_I(ftnint n); -void lwrt_L(ftnint n); -void lwrt_A(char *p, ftnlen len); -void lwrt_F(double n); -void lwrt_C(double a,double b); - -int -s_wsle(cilist *a) -{ - int n; - if(!init) f_init(); - if((n=c_le(a,WRITE))) return(n); - reading=0; - external=1; - formatted=1; - putn = t_putc; - lioproc = l_write; - if(!curunit->uwrt) - return(nowwriting(curunit)); - else return(0); -} - -int -e_wsle() -{ - t_putc('\n'); - recpos=0; - return(0); -} - -int -t_putc(c) -{ - recpos++; - putc(c,cf); - return 0; -} - -void -lwrt_I(ftnint n) -{ - char buf[LINTW],*p; - sprintf(buf," %ld",(long)n); - if(recpos+strlen(buf)>=LINE) - { t_putc('\n'); - recpos=0; - } - for(p=buf;*p;t_putc(*p++)); -} - -void -lwrt_L(ftnint n) -{ - if(recpos+LLOGW>=LINE) - { t_putc('\n'); - recpos=0; - } - wrt_L(&n,LLOGW); -} - -void -lwrt_A(char *p, ftnlen len) -{ - int i; - if(recpos+len>=LINE) - { - t_putc('\n'); - recpos=0; - } - t_putc(' '); - for(i=0;i=LINE) - { - t_putc('\n'); - recpos=0; - } - scale=0; - wrt_F(&uf,LFW,LFD,(ftnlen)sizeof(uf)); - } - else - { - if(recpos+LEW>=LINE) - { t_putc('\n'); - recpos=0; - } - wrt_E(&uf,LEW,LED,LEE,(ftnlen)sizeof(uf)); - } -} - -void -lwrt_C(double a,double b) -{ - if(recpos+2*LFW+3>=LINE) - { t_putc('\n'); - recpos=0; - } - t_putc(' '); - t_putc('('); - lwrt_F(a); - lwrt_F(b); - t_putc(')'); -} - -int -l_write(ftnint *number, flex *ptr,ftnlen len, ftnint type) -{ - int i; - ftnint x; - double y,z; - float *xx; - double *yy; - for(i=0;i< *number; i++) - { - switch((int)type) - { - default: fatal(204,"unknown type in lio"); - case TYSHORT: x=ptr->flshort; - goto xint; - case TYLONG: x=ptr->flint; - xint: lwrt_I(x); - break; - case TYREAL: y=ptr->flreal; - goto xfloat; - case TYDREAL: y=ptr->fldouble; - xfloat: lwrt_F(y); - break; - case TYCOMPLEX: xx= &(ptr->flreal); - y = *xx++; - z = *xx; - goto xcomplex; - case TYDCOMPLEX: yy = &(ptr->fldouble); - y= *yy++; - z = *yy; - xcomplex: lwrt_C(y,z); - break; - case TYLOGICAL: lwrt_L(ptr->flint); - break; - case TYCHAR: lwrt_A((char *)ptr,len); - break; - } - ptr = (flex *)((char *)ptr + len); /* XXX ??? */ - } - return(0); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libI77/lio.h b/external/bsd/pcc/dist/pcc-libs/libI77/lio.h deleted file mode 100644 index fe1d8e87f3f9..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libI77/lio.h +++ /dev/null @@ -1,78 +0,0 @@ -/* Id: lio.h,v 1.3 2008/03/01 13:44:12 ragge Exp */ -/* $NetBSD: lio.h,v 1.1.1.2 2010/06/03 18:58:11 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -/* copy of ftypes from the compiler */ -/* variable types - * numeric assumptions: - * int < reals < complexes - * TYDREAL-TYREAL = TYDCOMPLEX-TYCOMPLEX - */ - -#define TYUNKNOWN 0 -#define TYADDR 1 -#define TYSHORT 2 -#define TYLONG 3 -#define TYREAL 4 -#define TYDREAL 5 -#define TYCOMPLEX 6 -#define TYDCOMPLEX 7 -#define TYLOGICAL 8 -#define TYCHAR 9 -#define TYSUBR 10 -#define TYERROR 11 - -#define NTYPES (TYERROR+1) - -#define LINTW 12 -#define LINE 80 -#define LLOGW 2 -#define LLOW 1.0 -#define LHIGH 10.0 -#define LFW 12 -#define LFD 8 -#define LEW 16 -#define LED 9 -#define LEE 2 - -typedef union -{ short flshort; - ftnint flint; - float flreal; - double fldouble; -} flex; -extern int scale; -extern int (*lioproc)(ftnint *number,flex *ptr,ftnlen len,ftnint type); -int do_lio(ftnint *type,ftnint *number,flex *ptr,ftnlen len); - diff --git a/external/bsd/pcc/dist/pcc-libs/libI77/lread.c b/external/bsd/pcc/dist/pcc-libs/libI77/lread.c deleted file mode 100644 index 45e359ae4ecb..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libI77/lread.c +++ /dev/null @@ -1,467 +0,0 @@ -/* Id: lread.c,v 1.3 2008/03/01 13:44:12 ragge Exp */ -/* $NetBSD: lread.c,v 1.1.1.2 2010/06/03 18:58:12 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "fio.h" -#include "fmt.h" -#include "lio.h" -#include "ctype.h" - -extern char *fmtbuf; -int (*lioproc)(ftnint *number,flex *ptr,ftnlen len,ftnint type); - -static int rd_int(double *x); -int l_R(void); -int l_C(void); -int l_L(void); -int l_CHAR(void); -int t_getc(void); -int t_sep(void); - -#define isblnk(x) (ltab[x+1]&B) -#define issep(x) (ltab[x+1]&SX) -#define isapos(x) (ltab[x+1]&AX) -#define isexp(x) (ltab[x+1]&EX) -#define SX 1 -#define B 2 -#define AX 4 -#define EX 8 -char ltab[128+1] = /* offset one for EOF */ -{ 0, - 0,0,AX,0,0,0,0,0,0,0,B,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - SX|B,0,AX,0,0,0,0,0,0,0,0,0,SX,0,0,SX, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,EX,EX,0,0,0,0,0,0,0,0,0,0, - AX,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,EX,EX,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -}; - -int l_first; - -int -t_getc() -{ int ch; - if(curunit->uend) return(EOF); - if((ch=getc(cf))!=EOF) return(ch); - if(feof(cf)) curunit->uend = 1; - return(EOF); -} - -int -e_rsle() -{ - int ch; - if(curunit->uend) return(0); - while((ch=t_getc())!='\n' && ch!=EOF); - return(0); -} - -flag lquit; -int lcount,ltype; -char *lchar; -double lx,ly; -#define ERR(x) if((n=(x))) return(n) -#define GETC(x) ((x=t_getc())) - -static int -l_read(ftnint *number,flex *ptr,ftnlen len,ftnint type) -{ int i,n,ch; - double *yy; - float *xx; - for(i=0;i<*number;i++) - { - if(curunit->uend) err(elist->ciend, EOF, "list in") - if(l_first) - { l_first=0; - for(GETC(ch);isblnk(ch);GETC(ch)); - ungetc(ch,cf); - } - else if(lcount==0) - { ERR(t_sep()); - if(lquit) return(0); - } - switch((int)type) - { - case TYSHORT: - case TYLONG: - case TYREAL: - case TYDREAL: - ERR(l_R()); - break; - case TYCOMPLEX: - case TYDCOMPLEX: - ERR(l_C()); - break; - case TYLOGICAL: - ERR(l_L()); - break; - case TYCHAR: - ERR(l_CHAR()); - break; - } - if(lquit) return(0); - if(feof(cf)) err(elist->ciend,(EOF),"list in") - else if(ferror(cf)) - { clearerr(cf); - err(elist->cierr,errno,"list in") - } - if(ltype==0) goto bump; - switch((int)type) - { - case TYSHORT: - ptr->flshort=lx; - break; - case TYLOGICAL: - case TYLONG: - ptr->flint=lx; - break; - case TYREAL: - ptr->flreal=lx; - break; - case TYDREAL: - ptr->fldouble=lx; - break; - case TYCOMPLEX: - xx=(float *)ptr; - *xx++ = lx; - *xx = ly; - break; - case TYDCOMPLEX: - yy=(double *)ptr; - *yy++ = lx; - *yy = ly; - break; - case TYCHAR: - b_char(lchar,(char *)ptr,len); - break; - } - bump: - if(lcount>0) lcount--; - ptr = (flex *)((char *)ptr + len); - } - return(0); -} - -int -l_R() -{ double a,b,c,d; - int i,ch,sign=0,da,db,dc; - a=b=c=d=0; - da=db=dc=0; - if(lcount>0) return(0); - ltype=0; - for(GETC(ch);isblnk(ch);GETC(ch)); - if(ch==',') - { lcount=1; - return(0); - } - if(ch=='/') - { lquit=1; - return(0); - } - ungetc(ch,cf); - da=rd_int(&a); - if(da== -1) sign=da; - if(GETC(ch)!='*') - { ungetc(ch,cf); - db=1; - b=a; - a=1; - } - else - db=rd_int(&b); - if(GETC(ch)!='.') - { dc=c=0; - ungetc(ch,cf); - } - else dc=rd_int(&c); - if(isexp(GETC(ch))) db=rd_int(&d); - else - { ungetc(ch,cf); - d=0; - } - lcount=a; - if(!db && !dc) - return(0); - if(db && b<0) - { sign=1; - b = -b; - } - for(i=0;i0) return(0); - ltype=0; - for(GETC(ch);isblnk(ch);GETC(ch)); - if(ch==',') - { lcount=1; - return(0); - } - if(ch=='/') - { lquit=1; - return(0); - } - if(ch!='(') - { if(fscanf(cf,"%d",&lcount)!=1) { - if(!feof(cf)) err(elist->cierr,112,"no rep") - else err(elist->cierr,(EOF),"lread"); - } - if(GETC(ch)!='*') - { ungetc(ch,cf); - if(!feof(cf)) err(elist->cierr,112,"no star") - else err(elist->cierr,(EOF),"lread"); - } - if(GETC(ch)!='(') - { ungetc(ch,cf); - return(0); - } - } - lcount = 1; - ltype=TYLONG; - fscanf(cf,"%lf",&lx); - while(isblnk(GETC(ch))); - if(ch!=',') - { ungetc(ch,cf); - err(elist->cierr,112,"no comma"); - } - while(isblnk(GETC(ch))); - ungetc(ch,cf); - fscanf(cf,"%lf",&ly); - while(isblnk(GETC(ch))); - if(ch!=')') err(elist->cierr,112,"no )"); - while(isblnk(GETC(ch))); - ungetc(ch,cf); - return(0); -} - -int -l_L() -{ - int ch; - if(lcount>0) return(0); - ltype=0; - while(isblnk(GETC(ch))); - if(ch==',') - { lcount=1; - return(0); - } - if(ch=='/') - { lquit=1; - return(0); - } - if(isdigit(ch)) - { ungetc(ch,cf); - fscanf(cf,"%d",&lcount); - if(GETC(ch)!='*') { - if(!feof(cf)) err(elist->cierr,112,"no star") - else err(elist->cierr,(EOF),"lread"); - } - } - else ungetc(ch,cf); - if(GETC(ch)=='.') GETC(ch); - switch(ch) - { - case 't': - case 'T': - lx=1; - break; - case 'f': - case 'F': - lx=0; - break; - default: - if(isblnk(ch) || issep(ch) || ch==EOF) - { ungetc(ch,cf); - return(0); - } - else err(elist->cierr,112,"logical"); - } - ltype=TYLONG; - while(!issep(GETC(ch)) && ch!='\n' && ch!=EOF); - return(0); -} -#define BUFSIZE 128 - -int -l_CHAR() -{ int ch,size,i; - char quote,*p; - if(lcount>0) return(0); - ltype=0; - - while(isblnk(GETC(ch))); - if(ch==',') - { lcount=1; - return(0); - } - if(ch=='/') - { lquit=1; - return(0); - } - if(isdigit(ch)) - { ungetc(ch,cf); - fscanf(cf,"%d",&lcount); - if(GETC(ch)!='*') err(elist->cierr,112,"no star"); - } - else ungetc(ch,cf); - if(GETC(ch)=='\'' || ch=='"') quote=ch; - else if(isblnk(ch) || issep(ch) || ch==EOF) - { ungetc(ch,cf); - return(0); - } - else err(elist->cierr,112,"no quote"); - ltype=TYCHAR; - if(lchar!=NULL) free(lchar); - size=BUFSIZE; - p=lchar=(char *)malloc(size); - if(lchar==NULL) err(elist->cierr,113,"no space"); - for(i=0;;) - { while(GETC(ch)!=quote && ch!='\n' - && ch!=EOF && ++iuwrt) - return(nowreading(curunit)); - else return(0); -} - -int -t_sep() -{ - int ch; - for(GETC(ch);isblnk(ch);GETC(ch)); - if(ch == EOF) { - if(feof(cf)) return(EOF); - else return(errno); - } - if(ch=='/') { - lquit=1; - return(0); - } - if(ch==',') for(GETC(ch);isblnk(ch);GETC(ch)); - ungetc(ch,cf); - return(0); -} - -int -c_le(cilist *a, int flag) -{ - fmtbuf="list io"; - if(a->ciunit>=MXUNIT || a->ciunit<0) - err(a->cierr,101,"stler"); - scale=recpos=0; - elist=a; - curunit = &units[a->ciunit]; - if(curunit->ufd==NULL && fk_open(flag,SEQ,FMT,a->ciunit)) - err(a->cierr,102,"lio"); - cf=curunit->ufd; - if(!curunit->ufmt) err(a->cierr,103,"lio") - return(0); -} - -int -do_lio(ftnint *type,ftnint *number,flex *ptr,ftnlen len) -{ - return((*lioproc)(number,ptr,len,*type)); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libI77/open.c b/external/bsd/pcc/dist/pcc-libs/libI77/open.c deleted file mode 100644 index 97f0785f0990..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libI77/open.c +++ /dev/null @@ -1,158 +0,0 @@ -/* Id: open.c,v 1.5 2008/05/06 10:09:52 ragge Exp */ -/* $NetBSD: open.c,v 1.1.1.2 2010/06/03 18:58:12 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 -#include - -#include -#include -#include -#include - -#include "fio.h" - -static int isdev(char *s); -int canseek(FILE *f); - - -int -f_open(olist *a) -{ unit *b; - int n; - char buf[256]; - cllist x; - if(a->ounit>=MXUNIT || a->ounit<0) - err(a->oerr,101,"open") - b= &units[a->ounit]; - if(b->ufd!=0) goto connected; -unconnected: - b->url=a->orl; - if(a->oblnk && *a->oblnk=='b') b->ublnk=1; - else b->ublnk=0; - if(a->ofm==0) - { if(b->url>0) b->ufmt=0; - else b->ufmt=1; - } - else if(*a->ofm=='f') b->ufmt=1; - else b->ufmt=0; - if(a->osta==0) goto unknown; - switch(*a->osta) - { - unknown: - default: - case 'o': - if(a->ofnm==0) err(a->oerr,107,"open") - g_char(a->ofnm,a->ofnmlen,buf); - b->uscrtch=0; - if(a->osta && *a->osta=='o' && access(buf,0)) - err(a->oerr,errno,"open") - done: - b->ufnm=(char *) calloc(strlen(buf)+1,sizeof(char)); - if(b->ufnm==NULL) err(a->oerr,113,"no space"); - strcpy(b->ufnm,buf); - b->uend=0; - if(isdev(buf)) - { b->ufd = fopen(buf,"r"); - if(b->ufd==NULL) err(a->oerr,errno,buf) - else b->uwrt = 0; - } - else - { b->ufd = fopen(buf, "a"); - if(b->ufd != NULL) b->uwrt = 1; - else if((b->ufd = fopen(buf, "r")) != NULL) - { fseek(b->ufd, 0L, 2); - b->uwrt = 0; - } - else err(a->oerr, errno, buf) - } - b->useek=canseek(b->ufd); - if((b->uinode=inode(buf))==-1) - err(a->oerr,108,"open") - if(a->orl && b->useek) rewind(b->ufd); - return(0); - case 's': - b->uscrtch=1; - strcpy(buf,"tmp.FXXXXXX"); - close(mkstemp(buf)); - goto done; - case 'n': - b->uscrtch=0; - if(a->ofnm==0) err(a->oerr,107,"open") - g_char(a->ofnm,a->ofnmlen,buf); - /*SYSDEP access*/ - if(access(buf, 0) == 0) creat(buf, 0666); - goto done; - } -connected: - if(a->ofnm==0) - { - same: if(a->oblnk!= 0) b->ublnk= *a->oblnk== 'b'?0:1; - return(0); - } - g_char(a->ofnm,a->ofnmlen,buf); - if(inode(buf)==b->uinode) goto same; - x.cunit=a->ounit; - x.csta=0; - x.cerr=a->oerr; - if((n=f_clos(&x))!=0) return(n); - goto unconnected; -} - -int -fk_open(int rd,int seq,int fmt, ftnint n) -{ - char nbuf[10]; - olist a; - sprintf(nbuf,"fort.%ld",n); - a.oerr=1; - a.ounit=n; - a.ofnm=nbuf; - a.ofnmlen=strlen(nbuf); - a.osta=NULL; - a.oacc= seq==SEQ?"s":"d"; - a.ofm = fmt==FMT?"f":"u"; - a.orl = seq==DIR?1:0; - a.oblnk=NULL; - return(f_open(&a)); -} - -int -isdev(char *s) -{ struct stat x; - int j; - if(stat(s, &x) == -1) return(0); - if((j = (x.st_mode&S_IFMT)) == S_IFREG || j == S_IFDIR) return(0); - else return(1); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libI77/pwd.c b/external/bsd/pcc/dist/pcc-libs/libI77/pwd.c deleted file mode 100644 index 86098b986eab..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libI77/pwd.c +++ /dev/null @@ -1,113 +0,0 @@ -/* Id: pwd.c,v 1.2 2008/02/26 19:54:44 ragge Exp */ -/* $NetBSD: pwd.c,v 1.1.1.2 2010/06/03 18:58:12 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -/* - * Print working (current) directory - */ -#include -#include -#include - -char dot[] "."; -char dotdot[] ".."; -char root[] "/"; -char name[512]; -int file; -int off -1; -struct stat x; -struct direct y; - -main() -{ - for (;;) { - stat(dot, &x); - if ((file = open(dotdot,0)) < 0) prname(); - do { - if (read(file, &y, sizeof(y)) < sizeof(y)) - prname(); - } while (y.d_ino != x.st_ino); - close(file); - if (y.d_ino == 2) - ckroot(); - cat(); - chdir(dotdot); - } -} - -ckroot() -{ - register i; - - if (stat(y.d_name,&x)<0 || chdir(root)<0 || (file=open(root,0))<0) - prname(); - i = x.st_dev; - do { - if (read(file,&y,sizeof(y)) < sizeof(y)) - prname(); - if (y.d_ino == 0) - continue; - if (stat(y.d_name,&x) < 0) - prname(); - } while (x.st_dev!=i || (x.st_mode&S_IFMT)!=S_IFDIR); - if (strcmp(dot, y.d_name) || strcmp(dotdot, y.d_name)) - cat(); - write(1, root, 1); - prname(); -} - -prname() -{ - if (off<0) - off = 0; - name[off] = '\n'; - write(1, name, off+1); - exit(0); -} - -cat() -{ - register i, j; - - i = -1; - while (y.d_name[++i] != 0); - if ((off+i+2) > 511) - prname(); - for(j=off+1; j>=0; --j) - name[j+i+1] = name[j]; - off=i+off+1; - name[i] = root[0]; - for(--i; i>=0; --i) - name[i] = y.d_name[i]; -} diff --git a/external/bsd/pcc/dist/pcc-libs/libI77/rdfmt.c b/external/bsd/pcc/dist/pcc-libs/libI77/rdfmt.c deleted file mode 100644 index 2c0d60e07c96..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libI77/rdfmt.c +++ /dev/null @@ -1,290 +0,0 @@ -/* Id: rdfmt.c,v 1.3 2008/03/01 13:44:12 ragge Exp */ -/* $NetBSD: rdfmt.c,v 1.1.1.2 2010/06/03 18:58:12 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 - -#include "fio.h" -#include "fmt.h" -extern int cursor; - -int rd_I(unint *n, int w, ftnlen len); -int rd_L(ftnint *n, int w); -int rd_A(char *p, ftnlen len); -int rd_AW(char *p, int w, ftnlen len); -int rd_F(ufloat *p, int w, int d, ftnlen len); -int rd_POS(char *s); -int rd_H(int n, char *s); - - -int -rd_ed(struct syl *p, void *ptr, ftnlen len) -{ - int ch; - for(;cursor>0;cursor--) if((ch=(*getn)())<0) return(ch); - if(cursor<0) - { if(recpos+cursor < 0) err(elist->cierr,110,"fmt") - if(curunit->useek) fseek(cf,(long) cursor,1); - else err(elist->cierr,106,"fmt"); - cursor=0; - } - switch(p->op) - { - default: fprintf(stderr,"rd_ed, unexpected code: %d\n%s\n", - p->op,fmtbuf); - abort(); - case I: ch = (rd_I(ptr,p->p1,len)); - break; - case IM: ch = (rd_I(ptr,p->p1,len)); - break; - case L: ch = (rd_L(ptr,p->p1)); - break; - case A: ch = (rd_A(ptr,len)); - break; - case AW: - ch = (rd_AW(ptr,p->p1,len)); - break; - case E: case EE: - case D: - case G: - case GE: - case F: ch = (rd_F(ptr,p->p1,p->p2,len)); - break; - } - if(ch == 0) return(ch); - else if(feof(cf)) return(EOF); - clearerr(cf); - return(errno); -} - -int -rd_ned(struct syl *p, char *ptr) -{ - switch(p->op) - { - default: fprintf(stderr,"rd_ned, unexpected code: %d\n%s\n", - p->op,fmtbuf); - abort(); - case APOS: - return(rd_POS((char /* XXX */ *)p->p1)); - case H: return(rd_H(p->p1,(char /* XXX */ *)p->p2)); - case SLASH: return((*donewrec)()); - case TR: - case X: cursor += p->p1; - return(1); - case T: cursor=p->p1-recpos; - return(1); - case TL: cursor -= p->p1; - return(1); - } -} - -int -rd_I(unint *n, int w, ftnlen len) -{ - long x=0; - int i,sign=0,ch; - for(i=0;iis=x; - else n->il=x; - return(0); -} - -int -rd_L(ftnint *n, int w) -{ - int ch,i,v = -1; - for(i=0;i='0') - x=10*x+ch-'0'; - else if(ch=='e' || ch=='d' || ch=='.') - break; - else if(cblank && ch==' ') x*=10; - else if(ch==',') - { i=w; - break; - } - else if(ch!='\n') return(errno=115); - } - if(ch=='.') dot=1; - while(i='0') - y=10*y+ch-'0'; - else if(cblank && ch==' ') - y *= 10; - else if(ch==',') {i=w; break;} - else if(ch==' ') continue; - else continue; - ny++; - } - if(ch=='-') sz=1; - while(i='0') - z=10*z+ch-'0'; - else if(cblank && ch==' ') - z *= 10; - else if(ch==',') break; - else if(ch==' ') continue; - else if(ch=='+') continue; - else if(ch!='\n') return(errno=115); - } - if(!dot) - for(i=0;i0;i--) x /= 10; - for(i=scale;i<0;i++) x *= 10; - } - if(len==sizeof(float)) p->pf=x; - else p->pd=x; - return(0); -} - -int -rd_A(char *p, ftnlen len) -{ - int i,ch; - for(i=0;i=len) - { for(i=0;iaunit>=MXUNIT || a->aunit<0) err(a->aerr,101,"rewind"); - b = &units[a->aunit]; - if(b->ufd==NULL && fk_open(READ,SEQ,FMT,a->aunit)) err(a->aerr,114,"rewind") - if(!b->useek) err(a->aerr,106,"rewind") - if(b->uwrt) - { nowreading(b); - t_runc(b); - } - rewind(b->ufd); - b->uend=0; - return(0); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libI77/rsfe.c b/external/bsd/pcc/dist/pcc-libs/libI77/rsfe.c deleted file mode 100644 index 35cbdf9f7a43..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libI77/rsfe.c +++ /dev/null @@ -1,112 +0,0 @@ -/* Id: rsfe.c,v 1.3 2008/03/01 13:44:12 ragge Exp */ -/* $NetBSD: rsfe.c,v 1.1.1.2 2010/06/03 18:58:12 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -/* read sequential formatted external */ -#include "fio.h" -#include "fmt.h" -static int x_getc(void), x_endp(void), x_rev(void); -static int xrd_SL(void); - -int -s_rsfe(cilist *a) /* start */ -{ int n; - if(!init) f_init(); - if((n=c_sfe(a,READ))) return(n); - reading=1; - sequential=1; - formatted=1; - external=1; - elist=a; - cursor=recpos=0; - scale=0; - fmtbuf=a->cifmt; - if(pars_f(fmtbuf)<0) err(a->cierr,100,"startio"); - curunit= &units[a->ciunit]; - cf=curunit->ufd; - getn= x_getc; - doed= rd_ed; - doned= rd_ned; - fmt_bg(); - doend=x_endp; - donewrec=xrd_SL; - dorevert=x_rev; - cblank=curunit->ublnk; - cplus=0; - if(curunit->uwrt) nowreading(curunit); - return(0); -} - -int -xrd_SL() -{ int ch; - if(!curunit->uend) - while((ch=getc(cf))!='\n' && ch!=EOF); - cursor=recpos=0; - return(1); -} - -int -x_getc() -{ int ch; - if(curunit->uend) return(EOF); - if((ch=getc(cf))!=EOF && ch!='\n') - { recpos++; - return(ch); - } - if(ch=='\n') - { ungetc(ch,cf); - return(ch); - } - if(feof(cf)) - { errno=0; - curunit->uend=1; - return(-1); - } - return(-1); -} - -int -x_endp() -{ - xrd_SL(); - return(0); -} - -int -x_rev() -{ - xrd_SL(); - return(0); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libI77/sfe.c b/external/bsd/pcc/dist/pcc-libs/libI77/sfe.c deleted file mode 100644 index 485c21dd7807..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libI77/sfe.c +++ /dev/null @@ -1,64 +0,0 @@ -/* Id: sfe.c,v 1.3 2008/03/01 13:44:12 ragge Exp */ -/* $NetBSD: sfe.c,v 1.1.1.2 2010/06/03 18:58:12 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -/* sequential formatted external common routines*/ -#include "fio.h" -extern char *fmtbuf; - -int -e_rsfe() -{ int n; - n=en_fio(); - fmtbuf=NULL; - return(n); -} - -int -c_sfe(cilist *a, int flag) /* check */ -{ - unit *p; - - if(a->ciunit >= MXUNIT || a->ciunit<0) - err(a->cierr,101,"startio"); - p = &units[a->ciunit]; - if(p->ufd==NULL && fk_open(flag,SEQ,FMT,a->ciunit)) err(a->cierr,114,"sfe") - if(!p->ufmt) err(a->cierr,102,"sfe") - return(0); -} - -int -e_wsfe() -{ return(e_rsfe()); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libI77/sue.c b/external/bsd/pcc/dist/pcc-libs/libI77/sue.c deleted file mode 100644 index 77cfab74abc6..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libI77/sue.c +++ /dev/null @@ -1,110 +0,0 @@ -/* Id: sue.c,v 1.3 2008/03/01 13:44:12 ragge Exp */ -/* $NetBSD: sue.c,v 1.1.1.2 2010/06/03 18:58:12 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "fio.h" -extern int reclen; -long recloc; - -static int c_sue(cilist *a, int flag); - -int -s_rsue(cilist *a) -{ - int n; - if(!init) f_init(); - if((n=c_sue(a,READ))) return(n); - reading=1; - recpos=0; - if(curunit->uwrt) nowreading(curunit); - if(fread(&reclen,sizeof(int),1,cf) - != 1) - { if(feof(cf)) - { curunit->uend = 1; - err(a->ciend, EOF, "start"); - } - clearerr(cf); - err(a->cierr, errno, "start"); - } - return(0); -} - -int -s_wsue(cilist *a) -{ - int n; - if(!init) f_init(); - if((n=c_sue(a,WRITE))) return(n); - reading=0; - reclen=0; - if(!curunit->uwrt) nowwriting(curunit); - recloc=ftell(cf); - fseek(cf,(long)sizeof(int),1); - return(0); -} - -int -c_sue(cilist *a, int flag) -{ - if(a->ciunit >= MXUNIT || a->ciunit < 0) - err(a->cierr,101,"startio"); - external=sequential=1; - formatted=0; - curunit = &units[a->ciunit]; - elist=a; - if(curunit->ufd==NULL && fk_open(flag,SEQ,UNF,a->ciunit)) - err(a->cierr,114,"sue"); - cf=curunit->ufd; - if(curunit->ufmt) err(a->cierr,103,"sue") - if(!curunit->useek) err(a->cierr,103,"sue") - return(0); -} - -int -e_wsue() -{ long loc; - fwrite(&reclen,sizeof(int),1,cf); - loc=ftell(cf); - fseek(cf,recloc,0); - fwrite(&reclen,sizeof(int),1,cf); - fseek(cf,loc,0); - return(0); -} - -int -e_rsue() -{ - fseek(cf,(long)(reclen-recpos+sizeof(int)),1); - return(0); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libI77/uio.c b/external/bsd/pcc/dist/pcc-libs/libI77/uio.c deleted file mode 100644 index 905bd5c14de9..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libI77/uio.c +++ /dev/null @@ -1,85 +0,0 @@ -/* Id: uio.c,v 1.3 2008/03/01 13:44:12 ragge Exp */ -/* $NetBSD: uio.c,v 1.1.1.2 2010/06/03 18:58:12 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 "fio.h" -int reclen; - -static int do_ud(ftnint *number, char *ptr, ftnlen len); - -static int -do_us(ftnint *number, char *ptr, ftnlen len) -{ - if(reading) - { - recpos += *number * len; - if(recpos>reclen) - { - err(elist->cierr,110,"eof/uio"); - } - fread(ptr,(int)len,(int)(*number),cf); - return(0); - } - else - { - reclen += *number * len; - fwrite(ptr,(int)len,(int)(*number),cf); - return(0); - } -} - -int -do_uio(ftnint *number, char *ptr, ftnlen len) -{ - if(sequential) - return(do_us(number,ptr,len)); - else return(do_ud(number,ptr,len)); -} - -int -do_ud(ftnint *number, char *ptr, ftnlen len) -{ - recpos += *number * len; - if(recpos > curunit->url && curunit->url!=1) - err(elist->cierr,110,"eof/uio"); - if(reading) - { - if(fread(ptr,(int)len,(int)(*number),cf) - != *number) - err(elist->cierr,errno,"eof/uio") - else return(0); - } - fwrite(ptr,(int)len,(int)(*number),cf); - return(0); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libI77/util.c b/external/bsd/pcc/dist/pcc-libs/libI77/util.c deleted file mode 100644 index dd92220d7551..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libI77/util.c +++ /dev/null @@ -1,177 +0,0 @@ -/* Id: util.c,v 1.4 2008/05/04 10:38:33 ragge Exp */ -/* $NetBSD: util.c,v 1.1.1.2 2010/06/03 18:58:12 plunky Exp $ */ -/* - * Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. - * - * 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 and documentation 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 conditionsand the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed or owned by Caldera - * International, Inc. - * Neither the name of Caldera International, Inc. nor the names of other - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA - * INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE - * FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (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 -#include -#include - -#include -#include -#include -#include - -#include "fio.h" - -static void dcat(char *a,char *b); - -#define DIRSIZE 14 - -void -g_char(char *a, ftnlen alen, char *b) -{ - char *x=a+alen-1,*y=b+alen-1; - *(y+1)=0; - for(;x>=a && *x==' ';x--) *y--=0; - for(;x>=a;*y--= *x--); -} - -void -b_char(char *a, char *b, ftnlen blen) -{ - int i; - for(i=0;iy) for(;num>0;num--) *y++= *x++; - else for(num--;num>=0;num--) *(y+num)= *(x+num); - } - else - { register char *x=a,*y=b; - if(x>y) for(;num>0;num--) *y++= *x++; - else for(num--;num>=0;num--) *(y+num)= *(x+num); - } -} -static char * -curdir(void) -{ char name[256],*bufpos = name; - struct stat x; - struct dirent y; - int file,i; - *bufpos++ = 0; -loop: stat(".",&x); - if((file=open("..",0))<0) goto done; - do - { if(read(file,&y,sizeof(y)) -#include - -#include "fio.h" -#include "fmt.h" - -int wrt_I(unint *n,int w,ftnlen len); -int wrt_IM(unint *n,int w,int m,ftnlen len); -int wrt_AP(int n); -int wrt_A(char *p,ftnlen len); -int wrt_AW(char *p, int w,ftnlen len); -int wrt_G(ufloat *p,int w,int d,int e,ftnlen len); -int wrt_H(int a,int b); - -extern int cursor; -static int -mv_cur(void) -{ /*buggy, could move off front of record*/ - for(;cursor>0;cursor--) (*putn)(' '); - if(cursor<0) - { - if(cursor+recpos<0) err(elist->cierr,110,"left off"); - if(curunit->useek) fseek(cf,(long)cursor,1); - else err(elist->cierr,106,"fmt"); - cursor=0; - } - return(0); -} - -int -w_ed(struct syl *p, void *ptr, ftnlen len) -{ - if(mv_cur()) return(mv_cur()); - switch(p->op) - { - default: - fprintf(stderr,"w_ed, unexpected code: %d\n%s\n", - p->op,fmtbuf); - abort(); - case I: return(wrt_I(ptr,p->p1,len)); - case IM: - return(wrt_IM(ptr,p->p1,p->p2,len)); - case L: return(wrt_L(ptr,p->p1)); - case A: return(wrt_A(ptr,len)); - case AW: - return(wrt_AW(ptr,p->p1,len)); - case D: - case E: - case EE: - return(wrt_E(ptr,p->p1,p->p2,p->p3,len)); - case G: - case GE: - return(wrt_G(ptr,p->p1,p->p2,p->p3,len)); - case F: return(wrt_F(ptr,p->p1,p->p2,len)); - } -} - -int -w_ned(struct syl *p, char *ptr) -{ - switch(p->op) - { - default: fprintf(stderr,"w_ned, unexpected code: %d\n%s\n", - p->op,fmtbuf); - abort(); - case SLASH: - return((*donewrec)()); - case T: cursor = p->p1-recpos; - return(1); - case TL: cursor -= p->p1; - return(1); - case TR: - case X: - cursor += p->p1; - return(1); - case APOS: - return(wrt_AP(p->p1)); - case H: - return(wrt_H(p->p1,p->p2)); - } -} - -int -wrt_I(unint *n,int w,ftnlen len) -{ int ndigit,sign,spare,i; - long x; - char *ans; - if(len==sizeof(short)) x=n->is; - else if(len == sizeof(char)) x = n->ic; - else x=n->il; - ans=icvt(x,&ndigit,&sign); - spare=w-ndigit; - if(sign || cplus) spare--; - if(spare<0) - for(i=0;iis; - else if(len == sizeof(char)) x = n->ic; - else x=n->il; - ans=icvt(x,&ndigit,&sign); - if(sign || cplus) xsign=1; - else xsign=0; - if(ndigit+xsign>w || m+xsign>w) - { for(i=0;i=m) - spare=w-ndigit-xsign; - else - spare=w-m-xsign; - for(i=0;i 0) (*putn)(*p++); - return(0); -} - -int -wrt_AW(char *p, int w,ftnlen len) -{ - while(w>len) - { w--; - (*putn)(' '); - } - while(w-- > 0) - (*putn)(*p++); - return(0); -} - -#define MXSTR 80 -char nr[MXSTR]; - -/* - * Trivial ecvt implementation. - */ -static char * -Xecvt(double value, int ndigit, int *decpt, int *sign) -{ - char fmt[10]; - char *w = nr; - - if (ndigit > 70) - ndigit = 70; - - snprintf(fmt, 10, "%%# .%de", ndigit-1); - snprintf(nr, MXSTR, fmt, value); - *sign = (*w == '-' ? 1 : 0); - w[2] = w[1]; - *decpt = atoi(&nr[ndigit+3]) + 1; - nr[ndigit+2] = 0; - return &nr[2]; -} - - -int -wrt_E(ufloat *p,int w,int d,int e, ftnlen len) -{ char *s; - int dp,sign,i,delta; - - if(scale>0) d++; - s=Xecvt( (len==sizeof(float)?p->pf:p->pd) ,d,&dp,&sign); - if(sign || cplus) delta=6; - else delta=5; - if(w -d) - { - (*putn)('.'); - for(i=0;i<-scale;i++) - (*putn)('0'); - for(i=0;i0 && scalepf != 0) dp -= scale; - else dp = 0; - if(dp < 100 && dp > -100) (*putn)('e'); - if(dp<0) - { (*putn)('-'); - dp = -dp; - } - else (*putn)('+'); - if(e>=3 || dp >= 100) - { (*putn)(dp/100 + '0'); - dp = dp % 100; - } - if(e!=1) (*putn)(dp/10+'0'); - (*putn)(dp%10+'0'); - return(0); -} - -int -wrt_G(ufloat *p,int w,int d,int e,ftnlen len) -{ double up = 1,x; - int i,oldscale=scale,n,j; - x= len==sizeof(float)?p->pf:p->pd; - if(x < 0 ) x = -x; - if(x<.1) return(wrt_E(p,w,d,e,len)); - for(i=0;i<=d;i++,up*=10) - { if(x>up) continue; - scale=0; - if(e==0) n=4; - else n=e+2; - i=wrt_F(p,w-n,d-i,len); - for(j=0;j 70) - ndigit = 70; - - snprintf(fmt, 10, "%%# .%df", ndigit); - snprintf(nr, MXSTR, fmt, value); - *sign = (*w == '-' ? 1 : 0); - if (w[1] == '0') { - *decpt = 0; - w+= 3; - } else { - for (w+= 1; *w && *w != '.'; w++) - ; - *decpt = w - nr - 1; - while (*w) - *w = w[1], w++; - w = &nr[1]; - } - return w; -} - - -int -wrt_F(ufloat *p, int w,int d, ftnlen len) -{ int i,delta,dp,sign,n; - double x; - char *s; - - x= (len==sizeof(float)?p->pf:p->pd); - if(scale) - { if(scale>0) - for(i=0;i=d) sign=0; - if(sign || cplus) delta=2; - else delta=1; - n= w - (d+delta+(dp>0?dp:0)); - if(n<0) - { - for(i=0;icifmt; - if(pars_f(fmtbuf)<0) err(a->cierr,100,"startio"); - curunit = &units[a->ciunit]; - cf=curunit->ufd; - putn= x_putc; - doed= w_ed; - doned= w_ned; - doend=xw_end; - dorevert=xw_rev; - donewrec=x_wSL; - fmt_bg(); - cplus=0; - cblank=curunit->ublnk; - if(!curunit->uwrt) nowwriting(curunit); - return(0); -} - -int -x_putc(c) -{ - recpos++; - putc(c,cf); - return 0; -} - -void -pr_put(c) -{ static flag new = 1; - recpos++; - if(c=='\n') - { new=1; - putc(c,cf); - } - else if(new==1) - { new=0; - if(c=='0') putc('\n',cf); - else if(c=='1') putc('\f',cf); - } - else putc(c,cf); -} - -int -x_wSL() -{ - recpos=0; - (*putn)('\n'); - return(1); -} - -int -xw_end() -{ - (*putn)('\n'); - return(0); -} - -int -xw_rev() -{ - if(workdone) (*putn)('\n'); - return(workdone=0); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/Makefile.in b/external/bsd/pcc/dist/pcc-libs/libpcc/Makefile.in deleted file mode 100644 index a28a1df8fbdc..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/Makefile.in +++ /dev/null @@ -1,72 +0,0 @@ -# Id: Makefile.in,v 1.13 2009/05/19 05:16:34 gmcgarry Exp -# $NetBSD: Makefile.in,v 1.1.1.3 2010/06/03 18:58:13 plunky Exp $ -# -# Makefile.in for libpcc.a -# - -VPATH = @srcdir@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = @top_builddir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ -libdir = @libdir@ - -CC = @CC@ -TARGMACH = @targmach@ -TARGOS = @targos@ -TARGET = @target@ -VERSION = @version@ -PCCLIBDIR = $(libdir)/pcc/$(TARGET)/$(VERSION)/lib -PCCINCDIR = $(libdir)/pcc/$(TARGET)/$(VERSION)/include - -CPPFLAGS += @CPPFLAGS@ -I$(srcdir) @ENDIAN_FLAG@ -Dos_$(TARGOS) - -LIBS = @LIBS@ -AR = @AR@ -RANLIB = @RANLIB@ -INSTALL = @INSTALL@ - -HEADERS += float.h stdarg.h stdbool.h stddef.h \ - libpcc_float.h libpcc_stdarg.h libpcc_stdbool.h libpcc_stddef.h - -OBJS += cmpdi2.o divdi3.o fixdfdi.o fixsfdi.o fixunsdfdi.o \ - fixunssfdi.o floatdidf.o floatdisf.o floatunsdidf.o \ - moddi3.o muldi3.o negdi2.o qdivrem.o \ - ucmpdi2.o udivdi3.o umoddi3.o - -OBJS += ashldi3.o ashrdi3.o lshrdi3.o - -OBJS += _alloca.o - -OBJS += ssp.o - -DEST = libpcc.a - -all: $(DEST) - -$(DEST): $(OBJS) - $(AR) r $@ $? - $(RANLIB) $@ - -.c.o : - $(CC) -O $(CPPFLAGS) $(CFLAGS) -c $< - -install: install-headers install-lib - -install-headers: - test -z "${DESTDIR}$(PCCINCDIR)" || mkdir -p "${DESTDIR}$(PCCINCDIR)" - headers='$(HEADERS)'; for i in $$headers; do \ - $(INSTALL) -m 644 $(srcdir)/include/$$i \ - ${DESTDIR}$(PCCINCDIR)/$$i; \ - done - -install-lib: - test -z "${DESTDIR}$(PCCLIBDIR)" || mkdir -p "${DESTDIR}$(PCCLIBDIR)" - $(INSTALL) -m 644 $(DEST) ${DESTDIR}$(PCCLIBDIR) - -clean: - /bin/rm -f $(OBJS) $(DEST) - -distclean: - /bin/rm -f Makefile diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/_alloca.c b/external/bsd/pcc/dist/pcc-libs/libpcc/_alloca.c deleted file mode 100644 index af85b2b69ed9..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/_alloca.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Id: _alloca.c,v 1.4 2009/03/15 00:20:41 gmcgarry Exp */ -/* $NetBSD: _alloca.c,v 1.1.1.3 2010/06/03 18:58:13 plunky Exp $ */ -/* - * This explanation of _alloca() comes from Chris Giese, posted to - * alt.os.dev: - * - * By default, Windows reserves 1 meg of virtual memory for the stack. - * No page of stack memory is actually allocated (commited) until the - * page is accessed. This is demand-allocation. The page beyond the - * top of the stack is the guard page. If this page is accessed, - * memory will be allocated for it, and the guard page moved downward - * by 4K (one page). Thus, the stack can grow beyond the initial 1 meg. - * Windows will not, however, let you grow the stack by accessing - * discontiguous pages of memory. Going beyond the guard page causes - * an exception. Stack-probing code prevents this. - */ - -#ifndef __MSC__ - -asm( " .text\n" - " .globl __alloca\n" - "__alloca:\n" -#ifdef __i386__ - " pop %edx\n" - " pop %eax\n" - " add $3,%eax\n" - " and $-4,%eax\n" - "1: cmp $4096,%eax\n" - " jge 2f\n" - " sub %eax,%esp\n" - " test %eax,(%esp)\n" - " mov %esp,%eax\n" - " push %edx\n" - " push %edx\n" - " ret\n" - "2: sub $4096,%esp\n" - " sub $4096,%eax\n" - " test %eax,(%esp)\n" - " jmp 1b\n" -#endif -); - -#endif diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/_ftol.asm b/external/bsd/pcc/dist/pcc-libs/libpcc/_ftol.asm deleted file mode 100644 index 9c268268c21b..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/_ftol.asm +++ /dev/null @@ -1,27 +0,0 @@ -; Id: _ftol.asm,v 1.1 2009/03/15 00:17:16 gmcgarry Exp -; $NetBSD: _ftol.asm,v 1.1.1.2 2010/06/03 18:58:13 plunky Exp $ -; -; Implementation of _ftol(), _ftol2() for win32 and masm. -; - .386 -_TEXT segment use32 para public 'CODE' - public __ftol2 -__ftol2 proc near - assume cs:_TEXT - fnstcw word ptr [esp-2] - mov ax, word ptr [esp-2] - or ax, 0C00h - mov word ptr [esp-4], ax - fldcw word ptr [esp-4] - fistp qword ptr [esp-12] - fldcw word ptr [esp-2] - mov eax, dword ptr [esp-12] - mov edx, dword ptr [esp-8] - ret -__ftol2 endp - -_TEXT ends - end - - alias __ftol = __ftol2 - public __ftol diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/_ftol.c b/external/bsd/pcc/dist/pcc-libs/libpcc/_ftol.c deleted file mode 100644 index abeb53362922..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/_ftol.c +++ /dev/null @@ -1,24 +0,0 @@ -/* Id: _ftol.c,v 1.2 2009/03/28 07:04:06 gmcgarry Exp */ -/* $NetBSD: _ftol.c,v 1.1.1.2 2010/06/03 18:58:13 plunky Exp $ */ - -/* - * _ftol() and _ftol2() implementations used on win32 when linking against - * other code built with Visual Studio. - */ - -asm( " .text\n" - " .globl __ftol\n" - " .globl __ftol2\n" - "__ftol:\n" - "__ftol2:\n" - " fnstcw -2(%esp)\n" - " movw -2(%esp),%ax\n" - " or %ax,0x0c00\n" - " movw %ax,-4(%esp)\n" - " fldcw -4(%esp)\n" - " fistpl -12(%esp)\n" - " fldcw -2(%esp)\n" - " movl -12(%esp),%eax\n" - " movl -8(%esp),%edx\n" - " ret\n" -); diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/adddi3.c b/external/bsd/pcc/dist/pcc-libs/libpcc/adddi3.c deleted file mode 100644 index 125146eb044c..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/adddi3.c +++ /dev/null @@ -1,55 +0,0 @@ -/* Id: adddi3.c,v 1.3 2009/03/15 00:20:41 gmcgarry Exp */ -/* $NetBSD: adddi3.c,v 1.1.1.3 2010/06/03 18:58:13 plunky Exp $ */ -/* NetBSD: adddi3.c,v 1.1 2005/12/20 19:28:51 christos Exp */ - -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * 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. 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 "quad.h" - -/* - * Add two quads. This is trivial since a one-bit carry from a single - * u_int addition x+y occurs if and only if the sum x+y is less than - * either x or y (the choice to compare with x or y is arbitrary). - */ -quad_t -__adddi3(quad_t a, quad_t b) -{ - union uu aa, bb, sum; - - aa.q = a; - bb.q = b; - sum.ul[L] = aa.ul[L] + bb.ul[L]; - sum.ul[H] = aa.ul[H] + bb.ul[H] + (sum.ul[L] < bb.ul[L]); - return (sum.q); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/anddi3.c b/external/bsd/pcc/dist/pcc-libs/libpcc/anddi3.c deleted file mode 100644 index 3f0f63927928..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/anddi3.c +++ /dev/null @@ -1,53 +0,0 @@ -/* Id: anddi3.c,v 1.3 2009/03/15 00:20:41 gmcgarry Exp */ -/* $NetBSD: anddi3.c,v 1.1.1.3 2010/06/03 18:58:13 plunky Exp $ */ -/* NetBSD: anddi3.c,v 1.1 2005/12/20 19:28:51 christos Exp */ - -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * 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. 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 "quad.h" - -/* - * Return a & b, in quad. - */ -quad_t -__anddi3(quad_t a, quad_t b) -{ - union uu aa, bb; - - aa.q = a; - bb.q = b; - aa.ul[0] &= bb.ul[0]; - aa.ul[1] &= bb.ul[1]; - return (aa.q); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/ashldi3.c b/external/bsd/pcc/dist/pcc-libs/libpcc/ashldi3.c deleted file mode 100644 index 414216d10c6c..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/ashldi3.c +++ /dev/null @@ -1,61 +0,0 @@ -/* Id: ashldi3.c,v 1.3 2009/03/15 00:20:41 gmcgarry Exp */ -/* $NetBSD: ashldi3.c,v 1.1.1.3 2010/06/03 18:58:13 plunky Exp $ */ -/* NetBSD: ashldi3.c,v 1.1 2005/12/20 19:28:51 christos Exp */ - -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * 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. 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 "quad.h" - -/* - * Shift a (signed) quad value left (arithmetic shift left). - * This is the same as logical shift left! - */ -quad_t -__ashldi3(quad_t a, qshift_t shift) -{ - union uu aa; - - if (shift == 0) - return(a); - aa.q = a; - if (shift >= INT_BITS) { - aa.ul[H] = aa.ul[L] << (shift - INT_BITS); - aa.ul[L] = 0; - } else { - aa.ul[H] = (aa.ul[H] << shift) | - (aa.ul[L] >> (INT_BITS - shift)); - aa.ul[L] <<= shift; - } - return (aa.q); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/ashrdi3.c b/external/bsd/pcc/dist/pcc-libs/libpcc/ashrdi3.c deleted file mode 100644 index 3a626c1e3926..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/ashrdi3.c +++ /dev/null @@ -1,73 +0,0 @@ -/* Id: ashrdi3.c,v 1.3 2009/03/15 00:20:41 gmcgarry Exp */ -/* $NetBSD: ashrdi3.c,v 1.1.1.3 2010/06/03 18:58:13 plunky Exp $ */ -/* NetBSD: ashrdi3.c,v 1.1 2005/12/20 19:28:51 christos Exp */ - -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * 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. 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 "quad.h" - -/* - * Shift a (signed) quad value right (arithmetic shift right). - */ -quad_t -__ashrdi3(quad_t a, qshift_t shift) -{ - union uu aa; - - if (shift == 0) - return(a); - aa.q = a; - if (shift >= INT_BITS) { - int s; - - /* - * Smear bits rightward using the machine's right-shift - * method, whether that is sign extension or zero fill, - * to get the `sign word' s. Note that shifting by - * INT_BITS is undefined, so we shift (INT_BITS-1), - * then 1 more, to get our answer. - */ - /* LINTED inherits machine dependency */ - s = (aa.sl[H] >> (INT_BITS - 1)) >> 1; - /* LINTED inherits machine dependency*/ - aa.ul[L] = aa.sl[H] >> (shift - INT_BITS); - aa.ul[H] = s; - } else { - aa.ul[L] = (aa.ul[L] >> shift) | - (aa.ul[H] << (INT_BITS - shift)); - /* LINTED inherits machine dependency */ - aa.sl[H] >>= shift; - } - return (aa.q); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/cmpdi2.c b/external/bsd/pcc/dist/pcc-libs/libpcc/cmpdi2.c deleted file mode 100644 index 8a5beb58f346..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/cmpdi2.c +++ /dev/null @@ -1,54 +0,0 @@ -/* Id: cmpdi2.c,v 1.3 2009/03/15 00:20:41 gmcgarry Exp */ -/* $NetBSD: cmpdi2.c,v 1.1.1.3 2010/06/03 18:58:13 plunky Exp $ */ -/* NetBSD: cmpdi2.c,v 1.1 2005/12/20 19:28:51 christos Exp */ - -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * 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. 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 "quad.h" - -/* - * Return 0, 1, or 2 as a <, =, > b respectively. - * Both a and b are considered signed---which means only the high word is - * signed. - */ -int -__cmpdi2(quad_t a, quad_t b) -{ - union uu aa, bb; - - aa.q = a; - bb.q = b; - return (aa.sl[H] < bb.sl[H] ? 0 : aa.sl[H] > bb.sl[H] ? 2 : - aa.ul[L] < bb.ul[L] ? 0 : aa.ul[L] > bb.ul[L] ? 2 : 1); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/divdi3.c b/external/bsd/pcc/dist/pcc-libs/libpcc/divdi3.c deleted file mode 100644 index 39404e1df9d8..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/divdi3.c +++ /dev/null @@ -1,62 +0,0 @@ -/* Id: divdi3.c,v 1.3 2009/03/15 00:20:41 gmcgarry Exp */ -/* $NetBSD: divdi3.c,v 1.1.1.3 2010/06/03 18:58:13 plunky Exp $ */ -/* NetBSD: divdi3.c,v 1.1 2005/12/20 19:28:51 christos Exp */ - -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * 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. 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 "quad.h" - -/* - * Divide two signed quads. - * ??? if -1/2 should produce -1 on this machine, this code is wrong - */ -quad_t -__divdi3(quad_t a, quad_t b) -{ - u_quad_t ua, ub, uq; - int neg = 0; - - ua = a; - ub = b; - - if (a < 0) - ua = -ua, neg ^= 1; - if (b < 0) - ub = -ub, neg ^= 1; - - uq = __qdivrem(ua, ub, (u_quad_t *)0); - if (neg) - uq = - uq; - return uq; -} diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/fixdfdi.c b/external/bsd/pcc/dist/pcc-libs/libpcc/fixdfdi.c deleted file mode 100644 index 4b2cfa878f93..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/fixdfdi.c +++ /dev/null @@ -1,57 +0,0 @@ -/* Id: fixdfdi.c,v 1.3 2009/03/15 00:20:41 gmcgarry Exp */ -/* $NetBSD: fixdfdi.c,v 1.1.1.3 2010/06/03 18:58:13 plunky Exp $ */ -/* NetBSD: fixdfdi.c,v 1.4 2003/08/07 16:43:16 agc Exp */ - -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * 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. 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 "quad.h" - -/* - * Convert double to (signed) quad. - * We clamp anything that is out of range. - */ -quad_t -__fixdfdi(double x) -{ - if (x < 0) - if (x <= QUAD_MIN) - return (QUAD_MIN); - else - return ((quad_t)-(u_quad_t)-x); - else - if (x >= QUAD_MAX) - return (QUAD_MAX); - else - return ((quad_t)(u_quad_t)x); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/fixsfdi.c b/external/bsd/pcc/dist/pcc-libs/libpcc/fixsfdi.c deleted file mode 100644 index 2c9018d21cd3..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/fixsfdi.c +++ /dev/null @@ -1,57 +0,0 @@ -/* Id: fixsfdi.c,v 1.3 2009/03/15 00:20:41 gmcgarry Exp */ -/* $NetBSD: fixsfdi.c,v 1.1.1.3 2010/06/03 18:58:13 plunky Exp $ */ -/* NetBSD: fixsfdi.c,v 1.4 2003/08/07 16:43:16 agc Exp */ - -/*- - * Copyright (c) 1992 The Regents of the University of California. - * All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * 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. 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 "quad.h" - -/* - * Convert float to (signed) quad. - * We clamp anything that is out of range. - */ -quad_t -__fixsfdi(float x) -{ - if (x < 0) - if (x <= QUAD_MIN) - return (QUAD_MIN); - else - return ((quad_t)-(u_quad_t)-x); - else - if (x >= QUAD_MAX) - return (QUAD_MAX); - else - return ((quad_t)(u_quad_t)x); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/fixunsdfdi.c b/external/bsd/pcc/dist/pcc-libs/libpcc/fixunsdfdi.c deleted file mode 100644 index 85923d84f638..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/fixunsdfdi.c +++ /dev/null @@ -1,75 +0,0 @@ -/* Id: fixunsdfdi.c,v 1.3 2009/03/15 00:20:41 gmcgarry Exp */ -/* $NetBSD: fixunsdfdi.c,v 1.1.1.3 2010/06/03 18:58:13 plunky Exp $ */ -/* NetBSD: fixunsdfdi.c,v 1.7 2003/08/07 16:43:16 agc Exp */ - -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * 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. 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 "quad.h" - -#define ONE_FOURTH ((int)1 << (INT_BITS - 2)) -#define ONE_HALF (ONE_FOURTH * 2.0) -#define ONE (ONE_FOURTH * 4.0) - -/* - * Convert double to (unsigned) quad. - * Not sure what to do with negative numbers---for now, anything out - * of range becomes UQUAD_MAX. - */ -u_quad_t -__fixunsdfdi(double x) -{ - union uu t; - unsigned int tmp; - - if (x < 0) - return (UQUAD_MAX); /* ??? should be 0? ERANGE??? */ -#ifdef notdef /* this falls afoul of a GCC bug */ - if (x >= UQUAD_MAX) - return (UQUAD_MAX); -#else /* so we wire in 2^64-1 instead */ - if (x >= 18446744073709551615.0) /* XXX */ - return (UQUAD_MAX); -#endif - /* - * Now we know that 0 <= x <= 18446744073709549568. The upper - * limit is one ulp less than 18446744073709551615 tested for above. - * Dividing this by 2^32 will *not* round irrespective of any - * rounding modes (except if the result is an IEEE denorm). - * Furthermore, the quotient will fit into a 32-bit integer. - */ - tmp = x / ONE; - t.ul[L] = (unsigned int) (x - tmp * ONE); - t.ul[H] = tmp; - return (t.uq); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/fixunssfdi.c b/external/bsd/pcc/dist/pcc-libs/libpcc/fixunssfdi.c deleted file mode 100644 index 65b545cf7cde..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/fixunssfdi.c +++ /dev/null @@ -1,94 +0,0 @@ -/* Id: fixunssfdi.c,v 1.3 2009/03/15 00:20:41 gmcgarry Exp */ -/* $NetBSD: fixunssfdi.c,v 1.1.1.3 2010/06/03 18:58:13 plunky Exp $ */ -/* NetBSD: fixunssfdi.c,v 1.6 2003/08/07 16:43:16 agc Exp */ - -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * 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. 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 "quad.h" - -#define ONE_FOURTH ((int)1 << (INT_BITS - 2)) -#define ONE_HALF (ONE_FOURTH * 2.0) -#define ONE (ONE_FOURTH * 4.0) - -/* - * Convert float to (unsigned) quad. We do most of our work in double, - * out of sheer paranoia. - * - * Not sure what to do with negative numbers---for now, anything out - * of range becomes UQUAD_MAX. - */ -u_quad_t -__fixunssfdi(float f) -{ - double x, toppart; - union uu t; - - if (f < 0) - return (UQUAD_MAX); /* ??? should be 0? ERANGE??? */ -#ifdef notdef /* this falls afoul of a GCC bug */ - if (f >= UQUAD_MAX) - return (UQUAD_MAX); -#else /* so we wire in 2^64-1 instead */ - if (f >= 18446744073709551615.0) /* XXX */ - return (UQUAD_MAX); -#endif - x = f; - /* - * Get the upper part of the result. Note that the divide - * may round up; we want to avoid this if possible, so we - * subtract `1/2' first. - */ - toppart = (x - ONE_HALF) / ONE; - /* - * Now build a u_quad_t out of the top part. The difference - * between x and this is the bottom part (this may introduce - * a few fuzzy bits, but what the heck). With any luck this - * difference will be nonnegative: x should wind up in the - * range [0..UINT_MAX]. For paranoia, we assume [INT_MIN.. - * 2*UINT_MAX] instead. - */ - t.ul[H] = (unsigned int)toppart; - t.ul[L] = 0; - x -= (double)t.uq; - if (x < 0) { - t.ul[H]--; - x += UINT_MAX; - } - if (x > UINT_MAX) { - t.ul[H]++; - x -= UINT_MAX; - } - t.ul[L] = (unsigned int)x; - return (t.uq); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/floatdidf.c b/external/bsd/pcc/dist/pcc-libs/libpcc/floatdidf.c deleted file mode 100644 index 22b0f4d1a9b1..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/floatdidf.c +++ /dev/null @@ -1,69 +0,0 @@ -/* Id: floatdidf.c,v 1.3 2009/03/15 00:20:41 gmcgarry Exp */ -/* $NetBSD: floatdidf.c,v 1.1.1.3 2010/06/03 18:58:13 plunky Exp $ */ -/* NetBSD: floatdidf.c,v 1.6 2003/08/07 16:43:16 agc Exp */ - -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * 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. 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 "quad.h" - -/* - * Convert (signed) quad to double. - */ -double -__floatdidf(quad_t x) -{ - double d; - union uu u; - int neg; - - /* - * Get an unsigned number first, by negating if necessary. - */ - if (x < 0) - u.q = -x, neg = 1; - else - u.q = x, neg = 0; - - /* - * Now u.ul[H] has the factor of 2^32 (or whatever) and u.ul[L] - * has the units. Ideally we could just set d, add INT_BITS to - * its exponent, and then add the units, but this is portable - * code and does not know how to get at an exponent. Machine- - * specific code may be able to do this more efficiently. - */ - d = (double)u.ul[H] * (((int)1 << (INT_BITS - 2)) * 4.0); - d += u.ul[L]; - - return (neg ? -d : d); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/floatdisf.c b/external/bsd/pcc/dist/pcc-libs/libpcc/floatdisf.c deleted file mode 100644 index cb366cbc4060..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/floatdisf.c +++ /dev/null @@ -1,71 +0,0 @@ -/* Id: floatdisf.c,v 1.3 2009/03/15 00:20:41 gmcgarry Exp */ -/* $NetBSD: floatdisf.c,v 1.1.1.3 2010/06/03 18:58:13 plunky Exp $ */ -/* NetBSD: floatdisf.c,v 1.6 2003/08/07 16:43:16 agc Exp */ - -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * 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. 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 "quad.h" - -/* - * Convert (signed) quad to float. - */ -float -__floatdisf(quad_t x) -{ - float f; - union uu u; - int neg; - - /* - * Get an unsigned number first, by negating if necessary. - */ - if (x < 0) - u.q = -x, neg = 1; - else - u.q = x, neg = 0; - - /* - * Now u.ul[H] has the factor of 2^32 (or whatever) and u.ul[L] - * has the units. Ideally we could just set f, add INT_BITS to - * its exponent, and then add the units, but this is portable - * code and does not know how to get at an exponent. Machine- - * specific code may be able to do this more efficiently. - * - * Using double here may be excessive paranoia. - */ - f = (double)u.ul[H] * (((int)1 << (INT_BITS - 2)) * 4.0); - f += u.ul[L]; - - return (neg ? -f : f); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/floatunsdidf.c b/external/bsd/pcc/dist/pcc-libs/libpcc/floatunsdidf.c deleted file mode 100644 index fa937cd1747f..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/floatunsdidf.c +++ /dev/null @@ -1,54 +0,0 @@ -/* Id: floatunsdidf.c,v 1.3 2009/03/15 00:20:41 gmcgarry Exp */ -/* $NetBSD: floatunsdidf.c,v 1.1.1.3 2010/06/03 18:58:13 plunky Exp $ */ -/* NetBSD: floatunsdidf.c,v 1.6 2003/08/07 16:43:16 agc Exp */ - -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * 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. 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 "quad.h" - -/* - * Convert (unsigned) quad to double. - * This is exactly like floatdidf.c except that negatives never occur. - */ -double -__floatunsdidf(u_quad_t x) -{ - double d; - union uu u; - - u.uq = x; - d = (double)u.ul[H] * (((int)1 << (INT_BITS - 2)) * 4.0); - d += u.ul[L]; - return (d); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/include/float.h b/external/bsd/pcc/dist/pcc-libs/libpcc/include/float.h deleted file mode 100644 index aa0295f80f98..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/include/float.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/include/libpcc_float.h b/external/bsd/pcc/dist/pcc-libs/libpcc/include/libpcc_float.h deleted file mode 100644 index efacb683aff1..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/include/libpcc_float.h +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef _LIBPCC_FLOAT_H_ -#define _LIBPCC_FLOAT_H_ - -#define FLT_RADIX 2 - -/* IEEE float */ -#define FLT_MANT_DIG 24 -#define FLT_DIG 6 -#define FLT_ROUNDS 1 -#define FLT_EPSILON 1.19209290e-07F -#define FLT_MIN_EXP (-125) -#define FLT_MIN 1.17549435e-38F -#define FLT_MIN_10_EXP (-37) -#define FLT_MAX_EXP 128 -#define FLT_MAX 3.40282347e+38F -#define FLT_MAX_10_EXP 38 - -/* IEEE double */ -#define DBL_MANT_DIG 53 -#define DBL_DIG 15 -#define DBL_EPSILON 2.2204460492503131e-16 -#define DBL_MIN_EXP (-1021) -#define DBL_MIN 2.2250738585072014e-308 -#define DBL_MIN_10_EXP (-307) -#define DBL_MAX_EXP 1024 -#define DBL_MAX 1.7976931348623157e+308 -#define DBL_MAX_10_EXP 308 - -#if defined(__i386__) - -/* intel long double */ -#define LDBL_MANT_DIG 64 -#define LDBL_DIG 18 -#define LDBL_EPSILON 1.08420217248550443401e-19L -#define LDBL_MIN_EXP (-16381) -#define LDBL_MIN 3.36210314311209350626e-4932L -#define LDBL_MIN_10_EXP (-4931) -#define LDBL_MAX_EXP 16384 -#define LDBL_MAX 1.18973149535723176502e+4932L -#define LDBL_MAX_10_EXP 4932 - -#else - -/* same as IEEE double */ -#define LDBL_MANT_DIG 53 -#define LDBL_DIG 15 -#define LDBL_EPSILON 2.2204460492503131e-16 -#define LDBL_MIN_EXP (-1021) -#define LDBL_MIN 2.2250738585072014e-308 -#define LDBL_MIN_10_EXP (-307) -#define LDBL_MAX_EXP 1024 -#define LDBL_MAX 1.7976931348623157e+308 -#define LDBL_MAX_10_EXP 308 - -#endif - -#endif diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/include/libpcc_stdarg.h b/external/bsd/pcc/dist/pcc-libs/libpcc/include/libpcc_stdarg.h deleted file mode 100644 index 198677516182..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/include/libpcc_stdarg.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef _LIBPCC_STDARG_H_ -#ifndef _ANSI_STDARG_H_ - -#ifndef __need___va_list -#define _LIBPCC_STDARG_H_ -#define _ANSI_STDARG_H_ -#endif - -#if defined(_LIBPCC_STDARG_H_) || defined(__need___va_list) -#ifndef _VA_LIST -typedef char * va_list; -#define _VA_LIST -#define _VA_LIST_DEFINED -#endif -/* For broken glibc headers */ -#ifndef __GNUC_VA_LIST -#define __gnuc_va_list void * -#define __GNUC_VA_LIST -#endif - -#endif - -#ifdef _LIBPCC_STDARG_H_ - -#define va_start(ap, last) __builtin_stdarg_start((ap), last) -#define va_arg(ap, type) __builtin_va_arg((ap), type) -#define va_end(ap) __builtin_va_end((ap)) -#define va_copy(dest, src) __builtin_va_copy((dest), (src)) - -#endif - -#undef __need___va_list - -#endif -#endif diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/include/libpcc_stdbool.h b/external/bsd/pcc/dist/pcc-libs/libpcc/include/libpcc_stdbool.h deleted file mode 100644 index fce5c52c653e..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/include/libpcc_stdbool.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef _LIBPCC_STDBOOL_H_ -#define _LIBPCC_STDBOOL_H_ - -#define __bool_true_false_are_defined 1 - -#ifndef __cplusplus - -#define bool _Bool -#define true 1 -#define false 0 - -#endif - -#endif diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/include/libpcc_stddef.h b/external/bsd/pcc/dist/pcc-libs/libpcc/include/libpcc_stddef.h deleted file mode 100644 index ef6c41d34119..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/include/libpcc_stddef.h +++ /dev/null @@ -1,75 +0,0 @@ -#ifndef _LIBPCC_STDDEF_H_ - -#if !defined(__need_wchar_t) && !defined(__need_size_t) \ - && !defined(__need_ptrdiff_t) && !defined(__need_NULL) \ - && !defined(__need_wint_t) -#define _LIBPCC_STDDEF_H_ -#endif - -#if defined(_LIBPCC_STDDEF_H_) || defined(__need_ptrdiff_t) -#if !defined(_PTRDIFF_T) && !defined(__ptrdiff_t_defined) -#define _PTRDIFF_T -#define __ptrdiff_t_defined -#ifdef __PTRDIFF_TYPE__ -typedef __PTRDIFF_TYPE__ ptrdiff_t; -#else -typedef int ptrdiff_t; -#endif -#endif -#endif - -#if defined(_LIBPCC_STDDEF_H_) || defined(__need_size_t) -#if !defined(_SIZE_T) && !defined(__size_t_defined) && !defined(_SIZE_T_) -#define _SIZE_T -#define _SIZE_T_ -#define __size_t_defined -#ifdef __SIZE_TYPE__ -typedef __SIZE_TYPE__ size_t; -#else -typedef unsigned long size_t; -#endif -#endif -#endif - -#if defined(_LIBPCC_STDDEF_H_) || defined(__need_wchar_t) -#ifndef __cplusplus -#if !defined(_WCHAR_T) && !defined(__wchar_t_defined) -#define _WCHAR_T -#define __wchar_t_defined -#ifdef __WCHAR_TYPE__ -typedef __WCHAR_TYPE__ wchar_t; -#else -typedef unsigned short wchar_t; -#endif -#endif -#endif -#endif - -#if defined(_LIBPCC_STDDEF_H_) || defined(__need_wint_t) -#if !defined(_WINT_T) && !defined(__wint_t_defined) -#define _WINT_T -#define __wint_t_defined -#ifdef __WINT_TYPE__ -typedef __WINT_TYPE__ wint_t; -#else -typedef unsigned int wint_t; -#endif -#endif -#endif - -#if defined(_LIBPCC_STDDEF_H_) || defined(__need_NULL) -#undef NULL -#define NULL (0) -#endif - -#if defined(_LIBPCC_STDDEF_H_) -#define offsetof(type, member) ((size_t)&(((type *) 0)->member)) -#endif - -#undef __need_ptrdiff_t -#undef __need_size_t -#undef __need_wchar_t -#undef __need_wint_t -#undef __need_NULL - -#endif diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/include/stdarg.h b/external/bsd/pcc/dist/pcc-libs/libpcc/include/stdarg.h deleted file mode 100644 index 506a1fbeb59a..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/include/stdarg.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/include/stdbool.h b/external/bsd/pcc/dist/pcc-libs/libpcc/include/stdbool.h deleted file mode 100644 index f08b36c5cde5..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/include/stdbool.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/include/stddef.h b/external/bsd/pcc/dist/pcc-libs/libpcc/include/stddef.h deleted file mode 100644 index 081f07077435..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/include/stddef.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/iordi3.c b/external/bsd/pcc/dist/pcc-libs/libpcc/iordi3.c deleted file mode 100644 index 642a17f9962a..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/iordi3.c +++ /dev/null @@ -1,53 +0,0 @@ -/* Id: iordi3.c,v 1.3 2009/03/15 00:20:41 gmcgarry Exp */ -/* $NetBSD: iordi3.c,v 1.1.1.3 2010/06/03 18:58:13 plunky Exp $ */ -/* NetBSD: iordi3.c,v 1.1 2005/12/20 19:28:51 christos Exp */ - -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * 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. 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 "quad.h" - -/* - * Return a | b, in quad. - */ -quad_t -__iordi3(quad_t a, quad_t b) -{ - union uu aa, bb; - - aa.q = a; - bb.q = b; - aa.ul[0] |= bb.ul[0]; - aa.ul[1] |= bb.ul[1]; - return (aa.q); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/lshldi3.c b/external/bsd/pcc/dist/pcc-libs/libpcc/lshldi3.c deleted file mode 100644 index 74859c7f5d21..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/lshldi3.c +++ /dev/null @@ -1,61 +0,0 @@ -/* Id: lshldi3.c,v 1.3 2009/03/15 00:20:41 gmcgarry Exp */ -/* $NetBSD: lshldi3.c,v 1.1.1.3 2010/06/03 18:58:13 plunky Exp $ */ -/* NetBSD: lshldi3.c,v 1.1 2005/12/20 19:28:51 christos Exp */ - -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * 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. 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 "quad.h" - -/* - * Shift an (unsigned) quad value left (logical shift left). - * This is the same as arithmetic shift left! - */ -quad_t -__lshldi3(quad_t a, qshift_t shift) -{ - union uu aa; - - if (shift == 0) - return(a); - aa.q = a; - if (shift >= INT_BITS) { - aa.ul[H] = aa.ul[L] << (shift - INT_BITS); - aa.ul[L] = 0; - } else { - aa.ul[H] = (aa.ul[H] << shift) | - (aa.ul[L] >> (INT_BITS - shift)); - aa.ul[L] <<= shift; - } - return (aa.q); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/lshrdi3.c b/external/bsd/pcc/dist/pcc-libs/libpcc/lshrdi3.c deleted file mode 100644 index a62a689f8c5a..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/lshrdi3.c +++ /dev/null @@ -1,60 +0,0 @@ -/* Id: lshrdi3.c,v 1.3 2009/03/15 00:20:42 gmcgarry Exp */ -/* $NetBSD: lshrdi3.c,v 1.1.1.3 2010/06/03 18:58:14 plunky Exp $ */ -/* NetBSD: lshrdi3.c,v 1.1 2005/12/20 19:28:51 christos Exp */ - -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * 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. 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 "quad.h" - -/* - * Shift an (unsigned) quad value right (logical shift right). - */ -quad_t -__lshrdi3(quad_t a, qshift_t shift) -{ - union uu aa; - - if (shift == 0) - return(a); - aa.q = a; - if (shift >= INT_BITS) { - aa.ul[L] = aa.ul[H] >> (shift - INT_BITS); - aa.ul[H] = 0; - } else { - aa.ul[L] = (aa.ul[L] >> shift) | - (aa.ul[H] << (INT_BITS - shift)); - aa.ul[H] >>= shift; - } - return (aa.q); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/moddi3.c b/external/bsd/pcc/dist/pcc-libs/libpcc/moddi3.c deleted file mode 100644 index 1c9a69e31700..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/moddi3.c +++ /dev/null @@ -1,62 +0,0 @@ -/* Id: moddi3.c,v 1.3 2009/03/15 00:20:42 gmcgarry Exp */ -/* $NetBSD: moddi3.c,v 1.1.1.3 2010/06/03 18:58:14 plunky Exp $ */ -/* NetBSD: moddi3.c,v 1.1 2005/12/20 19:28:51 christos Exp */ - -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * 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. 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 "quad.h" - -/* - * Return remainder after dividing two signed quads. - * - * XXX we assume a % b < 0 iff a < 0, but this is actually machine-dependent. - */ -quad_t -__moddi3(quad_t a, quad_t b) -{ - u_quad_t ua, ub, ur; - int neg = 0; - - ua = a; - ub = b; - - if (a < 0) - ua = -ua, neg ^= 1; - if (b < 0) - ub = -ub; - (void)__qdivrem(ua, ub, &ur); - if (neg) - ur = -ur; - return (ur); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/muldi3.c b/external/bsd/pcc/dist/pcc-libs/libpcc/muldi3.c deleted file mode 100644 index a5fe02bff462..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/muldi3.c +++ /dev/null @@ -1,241 +0,0 @@ -/* Id: muldi3.c,v 1.3 2009/03/15 00:20:42 gmcgarry Exp */ -/* $NetBSD: muldi3.c,v 1.1.1.3 2010/06/03 18:58:14 plunky Exp $ */ -/* NetBSD: muldi3.c,v 1.1 2005/12/20 19:28:51 christos Exp */ - -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * 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. 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 "quad.h" - -/* - * Multiply two quads. - * - * Our algorithm is based on the following. Split incoming quad values - * u and v (where u,v >= 0) into - * - * u = 2^n u1 * u0 (n = number of bits in `unsigned int', usu. 32) - * - * and - * - * v = 2^n v1 * v0 - * - * Then - * - * uv = 2^2n u1 v1 + 2^n u1 v0 + 2^n v1 u0 + u0 v0 - * = 2^2n u1 v1 + 2^n (u1 v0 + v1 u0) + u0 v0 - * - * Now add 2^n u1 v1 to the first term and subtract it from the middle, - * and add 2^n u0 v0 to the last term and subtract it from the middle. - * This gives: - * - * uv = (2^2n + 2^n) (u1 v1) + - * (2^n) (u1 v0 - u1 v1 + u0 v1 - u0 v0) + - * (2^n + 1) (u0 v0) - * - * Factoring the middle a bit gives us: - * - * uv = (2^2n + 2^n) (u1 v1) + [u1v1 = high] - * (2^n) (u1 - u0) (v0 - v1) + [(u1-u0)... = mid] - * (2^n + 1) (u0 v0) [u0v0 = low] - * - * The terms (u1 v1), (u1 - u0) (v0 - v1), and (u0 v0) can all be done - * in just half the precision of the original. (Note that either or both - * of (u1 - u0) or (v0 - v1) may be negative.) - * - * This algorithm is from Knuth vol. 2 (2nd ed), section 4.3.3, p. 278. - * - * Since C does not give us a `int * int = quad' operator, we split - * our input quads into two ints, then split the two ints into two - * shorts. We can then calculate `short * short = int' in native - * arithmetic. - * - * Our product should, strictly speaking, be a `long quad', with 128 - * bits, but we are going to discard the upper 64. In other words, - * we are not interested in uv, but rather in (uv mod 2^2n). This - * makes some of the terms above vanish, and we get: - * - * (2^n)(high) + (2^n)(mid) + (2^n + 1)(low) - * - * or - * - * (2^n)(high + mid + low) + low - * - * Furthermore, `high' and `mid' can be computed mod 2^n, as any factor - * of 2^n in either one will also vanish. Only `low' need be computed - * mod 2^2n, and only because of the final term above. - */ -static quad_t __lmulq(unsigned int, unsigned int); - -quad_t -__muldi3(quad_t a, quad_t b) -{ - union uu u, v, low, prod; - unsigned int high, mid, udiff, vdiff; - int negall, negmid; -#define u1 u.ul[H] -#define u0 u.ul[L] -#define v1 v.ul[H] -#define v0 v.ul[L] - - /* - * Get u and v such that u, v >= 0. When this is finished, - * u1, u0, v1, and v0 will be directly accessible through the - * int fields. - */ - if (a >= 0) - u.q = a, negall = 0; - else - u.q = -a, negall = 1; - if (b >= 0) - v.q = b; - else - v.q = -b, negall ^= 1; - - if (u1 == 0 && v1 == 0) { - /* - * An (I hope) important optimization occurs when u1 and v1 - * are both 0. This should be common since most numbers - * are small. Here the product is just u0*v0. - */ - prod.q = __lmulq(u0, v0); - } else { - /* - * Compute the three intermediate products, remembering - * whether the middle term is negative. We can discard - * any upper bits in high and mid, so we can use native - * unsigned int * unsigned int => unsigned int arithmetic. - */ - low.q = __lmulq(u0, v0); - - if (u1 >= u0) - negmid = 0, udiff = u1 - u0; - else - negmid = 1, udiff = u0 - u1; - if (v0 >= v1) - vdiff = v0 - v1; - else - vdiff = v1 - v0, negmid ^= 1; - mid = udiff * vdiff; - - high = u1 * v1; - - /* - * Assemble the final product. - */ - prod.ul[H] = high + (negmid ? -mid : mid) + low.ul[L] + - low.ul[H]; - prod.ul[L] = low.ul[L]; - } - return (negall ? -prod.q : prod.q); -#undef u1 -#undef u0 -#undef v1 -#undef v0 -} - -/* - * Multiply two 2N-bit ints to produce a 4N-bit quad, where N is half - * the number of bits in an int (whatever that is---the code below - * does not care as long as quad.h does its part of the bargain---but - * typically N==16). - * - * We use the same algorithm from Knuth, but this time the modulo refinement - * does not apply. On the other hand, since N is half the size of an int, - * we can get away with native multiplication---none of our input terms - * exceeds (UINT_MAX >> 1). - * - * Note that, for unsigned int l, the quad-precision result - * - * l << N - * - * splits into high and low ints as HHALF(l) and LHUP(l) respectively. - */ -static quad_t -__lmulq(unsigned int u, unsigned int v) -{ - unsigned int u1, u0, v1, v0, udiff, vdiff, high, mid, low; - unsigned int prodh, prodl, was; - union uu prod; - int neg; - - u1 = HHALF(u); - u0 = LHALF(u); - v1 = HHALF(v); - v0 = LHALF(v); - - low = u0 * v0; - - /* This is the same small-number optimization as before. */ - if (u1 == 0 && v1 == 0) - return (low); - - if (u1 >= u0) - udiff = u1 - u0, neg = 0; - else - udiff = u0 - u1, neg = 1; - if (v0 >= v1) - vdiff = v0 - v1; - else - vdiff = v1 - v0, neg ^= 1; - mid = udiff * vdiff; - - high = u1 * v1; - - /* prod = (high << 2N) + (high << N); */ - prodh = high + HHALF(high); - prodl = LHUP(high); - - /* if (neg) prod -= mid << N; else prod += mid << N; */ - if (neg) { - was = prodl; - prodl -= LHUP(mid); - prodh -= HHALF(mid) + (prodl > was); - } else { - was = prodl; - prodl += LHUP(mid); - prodh += HHALF(mid) + (prodl < was); - } - - /* prod += low << N */ - was = prodl; - prodl += LHUP(low); - prodh += HHALF(low) + (prodl < was); - /* ... + low; */ - if ((prodl += low) < low) - prodh++; - - /* return 4N-bit product */ - prod.ul[H] = prodh; - prod.ul[L] = prodl; - return (prod.q); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/negdi2.c b/external/bsd/pcc/dist/pcc-libs/libpcc/negdi2.c deleted file mode 100644 index aa31a1f179e6..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/negdi2.c +++ /dev/null @@ -1,52 +0,0 @@ -/* Id: negdi2.c,v 1.3 2009/03/15 00:20:42 gmcgarry Exp */ -/* $NetBSD: negdi2.c,v 1.1.1.3 2010/06/03 18:58:14 plunky Exp $ */ -/* NetBSD: negdi2.c,v 1.1 2005/12/20 19:28:51 christos Exp */ - -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * 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. 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 "quad.h" - -/* - * Return -a (or, equivalently, 0 - a), in quad. See subdi3.c. - */ -quad_t -__negdi2(quad_t a) -{ - union uu aa, res; - - aa.q = a; - res.ul[L] = -aa.ul[L]; - res.ul[H] = -aa.ul[H] - (res.ul[L] > 0); - return (res.q); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/notdi2.c b/external/bsd/pcc/dist/pcc-libs/libpcc/notdi2.c deleted file mode 100644 index 0dcdaa169b22..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/notdi2.c +++ /dev/null @@ -1,53 +0,0 @@ -/* Id: notdi2.c,v 1.3 2009/03/15 00:20:42 gmcgarry Exp */ -/* $NetBSD: notdi2.c,v 1.1.1.3 2010/06/03 18:58:14 plunky Exp $ */ -/* NetBSD: notdi2.c,v 1.1 2005/12/20 19:28:51 christos Exp */ - -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * 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. 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 "quad.h" - -/* - * Return ~a. For some reason gcc calls this `one's complement' rather - * than `not'. - */ -quad_t -__one_cmpldi2(quad_t a) -{ - union uu aa; - - aa.q = a; - aa.ul[0] = ~aa.ul[0]; - aa.ul[1] = ~aa.ul[1]; - return (aa.q); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/qdivrem.c b/external/bsd/pcc/dist/pcc-libs/libpcc/qdivrem.c deleted file mode 100644 index abd723bb1da2..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/qdivrem.c +++ /dev/null @@ -1,277 +0,0 @@ -/* Id: qdivrem.c,v 1.3 2009/03/15 00:20:42 gmcgarry Exp */ -/* $NetBSD: qdivrem.c,v 1.1.1.3 2010/06/03 18:58:14 plunky Exp $ */ -/* NetBSD: qdivrem.c,v 1.1 2005/12/20 19:28:51 christos Exp */ - -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * 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. 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. - */ - -/* - * Multiprecision divide. This algorithm is from Knuth vol. 2 (2nd ed), - * section 4.3.1, pp. 257--259. - */ - -#include "quad.h" - -#define B ((int)1 << HALF_BITS) /* digit base */ - -/* Combine two `digits' to make a single two-digit number. */ -#define COMBINE(a, b) (((unsigned int)(a) << HALF_BITS) | (b)) - -/* select a type for digits in base B: use unsigned short if they fit */ -#if UINT_MAX == 0xffffffffU && USHRT_MAX >= 0xffff -typedef unsigned short digit; -#else -typedef unsigned int digit; -#endif - -static void shl(digit *p, int len, int sh); - -/* - * __qdivrem(u, v, rem) returns u/v and, optionally, sets *rem to u%v. - * - * We do this in base 2-sup-HALF_BITS, so that all intermediate products - * fit within unsigned int. As a consequence, the maximum length dividend and - * divisor are 4 `digits' in this base (they are shorter if they have - * leading zeros). - */ -u_quad_t -__qdivrem(u_quad_t uq, u_quad_t vq, u_quad_t *arq) -{ - union uu tmp; - digit *u, *v, *q; - digit v1, v2; - unsigned int qhat, rhat, t; - int m, n, d, j, i; - digit uspace[5], vspace[5], qspace[5]; - - /* - * Take care of special cases: divide by zero, and u < v. - */ - if (vq == 0) { - /* divide by zero. */ - static volatile const unsigned int zero = 0; - - tmp.ul[H] = tmp.ul[L] = 1 / zero; - if (arq) - *arq = uq; - return (tmp.q); - } - if (uq < vq) { - if (arq) - *arq = uq; - return (0); - } - u = &uspace[0]; - v = &vspace[0]; - q = &qspace[0]; - - /* - * Break dividend and divisor into digits in base B, then - * count leading zeros to determine m and n. When done, we - * will have: - * u = (u[1]u[2]...u[m+n]) sub B - * v = (v[1]v[2]...v[n]) sub B - * v[1] != 0 - * 1 < n <= 4 (if n = 1, we use a different division algorithm) - * m >= 0 (otherwise u < v, which we already checked) - * m + n = 4 - * and thus - * m = 4 - n <= 2 - */ - tmp.uq = uq; - u[0] = 0; - u[1] = (digit)HHALF(tmp.ul[H]); - u[2] = (digit)LHALF(tmp.ul[H]); - u[3] = (digit)HHALF(tmp.ul[L]); - u[4] = (digit)LHALF(tmp.ul[L]); - tmp.uq = vq; - v[1] = (digit)HHALF(tmp.ul[H]); - v[2] = (digit)LHALF(tmp.ul[H]); - v[3] = (digit)HHALF(tmp.ul[L]); - v[4] = (digit)LHALF(tmp.ul[L]); - for (n = 4; v[1] == 0; v++) { - if (--n == 1) { - unsigned int rbj; /* r*B+u[j] (not root boy jim) */ - digit q1, q2, q3, q4; - - /* - * Change of plan, per exercise 16. - * r = 0; - * for j = 1..4: - * q[j] = floor((r*B + u[j]) / v), - * r = (r*B + u[j]) % v; - * We unroll this completely here. - */ - t = v[2]; /* nonzero, by definition */ - q1 = (digit)(u[1] / t); - rbj = COMBINE(u[1] % t, u[2]); - q2 = (digit)(rbj / t); - rbj = COMBINE(rbj % t, u[3]); - q3 = (digit)(rbj / t); - rbj = COMBINE(rbj % t, u[4]); - q4 = (digit)(rbj / t); - if (arq) - *arq = rbj % t; - tmp.ul[H] = COMBINE(q1, q2); - tmp.ul[L] = COMBINE(q3, q4); - return (tmp.q); - } - } - - /* - * By adjusting q once we determine m, we can guarantee that - * there is a complete four-digit quotient at &qspace[1] when - * we finally stop. - */ - for (m = 4 - n; u[1] == 0; u++) - m--; - for (i = 4 - m; --i >= 0;) - q[i] = 0; - q += 4 - m; - - /* - * Here we run Program D, translated from MIX to C and acquiring - * a few minor changes. - * - * D1: choose multiplier 1 << d to ensure v[1] >= B/2. - */ - d = 0; - for (t = v[1]; t < B / 2; t <<= 1) - d++; - if (d > 0) { - shl(&u[0], m + n, d); /* u <<= d */ - shl(&v[1], n - 1, d); /* v <<= d */ - } - /* - * D2: j = 0. - */ - j = 0; - v1 = v[1]; /* for D3 -- note that v[1..n] are constant */ - v2 = v[2]; /* for D3 */ - do { - digit uj0, uj1, uj2; - - /* - * D3: Calculate qhat (\^q, in TeX notation). - * Let qhat = min((u[j]*B + u[j+1])/v[1], B-1), and - * let rhat = (u[j]*B + u[j+1]) mod v[1]. - * While rhat < B and v[2]*qhat > rhat*B+u[j+2], - * decrement qhat and increase rhat correspondingly. - * Note that if rhat >= B, v[2]*qhat < rhat*B. - */ - uj0 = u[j + 0]; /* for D3 only -- note that u[j+...] change */ - uj1 = u[j + 1]; /* for D3 only */ - uj2 = u[j + 2]; /* for D3 only */ - if (uj0 == v1) { - qhat = B; - rhat = uj1; - goto qhat_too_big; - } else { - unsigned int nn = COMBINE(uj0, uj1); - qhat = nn / v1; - rhat = nn % v1; - } - while (v2 * qhat > COMBINE(rhat, uj2)) { - qhat_too_big: - qhat--; - if ((rhat += v1) >= B) - break; - } - /* - * D4: Multiply and subtract. - * The variable `t' holds any borrows across the loop. - * We split this up so that we do not require v[0] = 0, - * and to eliminate a final special case. - */ - for (t = 0, i = n; i > 0; i--) { - t = u[i + j] - v[i] * qhat - t; - u[i + j] = (digit)LHALF(t); - t = (B - HHALF(t)) & (B - 1); - } - t = u[j] - t; - u[j] = (digit)LHALF(t); - /* - * D5: test remainder. - * There is a borrow if and only if HHALF(t) is nonzero; - * in that (rare) case, qhat was too large (by exactly 1). - * Fix it by adding v[1..n] to u[j..j+n]. - */ - if (HHALF(t)) { - qhat--; - for (t = 0, i = n; i > 0; i--) { /* D6: add back. */ - t += u[i + j] + v[i]; - u[i + j] = (digit)LHALF(t); - t = HHALF(t); - } - u[j] = (digit)LHALF(u[j] + t); - } - q[j] = (digit)qhat; - } while (++j <= m); /* D7: loop on j. */ - - /* - * If caller wants the remainder, we have to calculate it as - * u[m..m+n] >> d (this is at most n digits and thus fits in - * u[m+1..m+n], but we may need more source digits). - */ - if (arq) { - if (d) { - for (i = m + n; i > m; --i) - u[i] = (digit)(((unsigned int)u[i] >> d) | - LHALF((unsigned int)u[i - 1] << (HALF_BITS - d))); - u[i] = 0; - } - tmp.ul[H] = COMBINE(uspace[1], uspace[2]); - tmp.ul[L] = COMBINE(uspace[3], uspace[4]); - *arq = tmp.q; - } - - tmp.ul[H] = COMBINE(qspace[1], qspace[2]); - tmp.ul[L] = COMBINE(qspace[3], qspace[4]); - return (tmp.q); -} - -/* - * Shift p[0]..p[len] left `sh' bits, ignoring any bits that - * `fall out' the left (there never will be any such anyway). - * We may assume len >= 0. NOTE THAT THIS WRITES len+1 DIGITS. - */ -static void -shl(digit *p, int len, int sh) -{ - int i; - - for (i = 0; i < len; i++) - p[i] = (digit)(LHALF((unsigned int)p[i] << sh) | - ((unsigned int)p[i + 1] >> (HALF_BITS - sh))); - p[i] = (digit)(LHALF((unsigned int)p[i] << sh)); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/quad.h b/external/bsd/pcc/dist/pcc-libs/libpcc/quad.h deleted file mode 100644 index ad0f587a4f08..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/quad.h +++ /dev/null @@ -1,157 +0,0 @@ -/* NetBSD: quad.h,v 1.1 2005/12/20 20:29:40 christos Exp */ - -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * 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. 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. - * - * @(#)quad.h 8.1 (Berkeley) 6/4/93 - */ - -/* - * Quad arithmetic. - * - * This library makes the following assumptions: - * - * - The type long long (aka quad_t) exists. - * - * - A quad variable is exactly twice as long as `int'. - * - * - The machine's arithmetic is two's complement. - * - * This library can provide 128-bit arithmetic on a machine with 128-bit - * quads and 64-bit ints, for instance, or 96-bit arithmetic on machines - * with 48-bit ints. - */ - -#ifndef __SunOS -#include -#endif - -#include - -#ifndef QUAD_MIN -#define QUAD_MIN (-0x7fffffffffffffffLL-1) -#endif -#ifndef QUAD_MAX -#define QUAD_MAX 0x7fffffffffffffffLL -#endif -#ifndef UQUAD_MAX -#define UQUAD_MAX 0xffffffffffffffffULL -#endif - -#ifdef WIN32 -typedef long long quad_t; -typedef unsigned long long u_quad_t; -#endif - -#ifdef __SunOS -typedef long long quad_t; -typedef unsigned long long u_quad_t; -#endif - -/* - * Depending on the desired operation, we view a `long long' (aka quad_t) in - * one or more of the following formats. - */ -union uu { - quad_t q; /* as a (signed) quad */ - u_quad_t uq; /* as an unsigned quad */ - int sl[2]; /* as two signed ints */ - unsigned int ul[2]; /* as two unsigned ints */ -}; - -/* - * Define high and low parts of a quad_t. - */ -#ifdef __BIG_ENDIAN__ -#define H 0 -#define L 1 -#else -#define H 1 -#define L 0 -#endif - -/* - * Total number of bits in a quad_t and in the pieces that make it up. - * These are used for shifting, and also below for halfword extraction - * and assembly. - */ -#define QUAD_BITS (sizeof(quad_t) * CHAR_BIT) -#define INT_BITS (sizeof(int) * CHAR_BIT) -#define HALF_BITS (sizeof(int) * CHAR_BIT / 2) - -/* - * Extract high and low shortwords from longword, and move low shortword of - * longword to upper half of long, i.e., produce the upper longword of - * ((quad_t)(x) << (number_of_bits_in_int/2)). (`x' must actually be unsigned int.) - * - * These are used in the multiply code, to split a longword into upper - * and lower halves, and to reassemble a product as a quad_t, shifted left - * (sizeof(int)*CHAR_BIT/2). - */ -#define HHALF(x) ((unsigned int)(x) >> HALF_BITS) -#define LHALF(x) ((unsigned int)(x) & (((int)1 << HALF_BITS) - 1)) -#define LHUP(x) ((unsigned int)(x) << HALF_BITS) - -/* - * XXX - * Compensate for gcc 1 vs gcc 2. Gcc 1 defines ?sh?di3's second argument - * as u_quad_t, while gcc 2 correctly uses int. Unfortunately, we still use - * both compilers. - */ -typedef unsigned int qshift_t; - -quad_t __adddi3(quad_t, quad_t); -quad_t __anddi3(quad_t, quad_t); -quad_t __ashldi3(quad_t, qshift_t); -quad_t __ashrdi3(quad_t, qshift_t); -int __cmpdi2(quad_t, quad_t); -quad_t __divdi3(quad_t, quad_t); -quad_t __fixdfdi(double); -quad_t __fixsfdi(float); -u_quad_t __fixunsdfdi(double); -u_quad_t __fixunssfdi(float); -double __floatdidf(quad_t); -float __floatdisf(quad_t); -double __floatunsdidf(u_quad_t); -quad_t __iordi3(quad_t, quad_t); -quad_t __lshldi3(quad_t, qshift_t); -quad_t __lshrdi3(quad_t, qshift_t); -quad_t __moddi3(quad_t, quad_t); -quad_t __muldi3(quad_t, quad_t); -quad_t __negdi2(quad_t); -quad_t __one_cmpldi2(quad_t); -u_quad_t __qdivrem(u_quad_t, u_quad_t, u_quad_t *); -quad_t __subdi3(quad_t, quad_t); -int __ucmpdi2(u_quad_t, u_quad_t); -u_quad_t __udivdi3(u_quad_t, u_quad_t); -u_quad_t __umoddi3(u_quad_t, u_quad_t); -quad_t __xordi3(quad_t, quad_t); diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/ssp.c b/external/bsd/pcc/dist/pcc-libs/libpcc/ssp.c deleted file mode 100644 index dcdb51c2dbad..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/ssp.c +++ /dev/null @@ -1,72 +0,0 @@ -/* Id: ssp.c,v 1.8 2009/01/23 20:31:09 gmcgarry Exp */ -/* $NetBSD: ssp.c,v 1.1.1.3 2010/06/03 18:58:14 plunky Exp $ */ -/*- - * Copyright (c) 2008 Gregory McGarry - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include -#include - -#if defined(__lint__) -#define __constructor /* define away */ -#define __destructor /* define away */ -#elif defined(__PCC__) -#define __constructor _Pragma("init") -#define __destructor _Pragma("fini") -#elif defined(__GNUC__) -#define __constructor __attribute__((constructor)) -#define __destructor __attribute__((destructor)) -#else -#define __constructor -#define __destructor -#endif - -#ifdef os_win32 -#define __progname "ERROR" -#else -extern char *__progname; -#endif - -int __stack_chk_guard; - -void __constructor -__ssp_init(void) -{ - int fd; - size_t sz; - - if (__stack_chk_guard != 0) - return; - - fd = open("/dev/urandom", 0); - if (fd > 0) { - sz = read(fd, (char *)&__stack_chk_guard, - sizeof(__stack_chk_guard)); - close(fd); - if (sz == sizeof(__stack_chk_guard)) - return; - } - - __stack_chk_guard = 0x00000aff; -} - -void -__stack_chk_fail(void) -{ - static const char msg[] = ": stack smashing attack detected\n"; - write(2, __progname, strlen(__progname)); - write(2, msg, sizeof(msg) - 1); - abort(); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/subdi3.c b/external/bsd/pcc/dist/pcc-libs/libpcc/subdi3.c deleted file mode 100644 index 4456e58ef31e..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/subdi3.c +++ /dev/null @@ -1,54 +0,0 @@ -/* Id: subdi3.c,v 1.3 2009/03/15 00:20:42 gmcgarry Exp */ -/* $NetBSD: subdi3.c,v 1.1.1.3 2010/06/03 18:58:14 plunky Exp $ */ -/* NetBSD: subdi3.c,v 1.1 2005/12/20 19:28:51 christos Exp */ - -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * 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. 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 "quad.h" - -/* - * Subtract two quad values. This is trivial since a one-bit carry - * from a single u_int difference x-y occurs if and only if (x-y) > x. - */ -quad_t -__subdi3(quad_t a, quad_t b) -{ - union uu aa, bb, diff; - - aa.q = a; - bb.q = b; - diff.ul[L] = aa.ul[L] - bb.ul[L]; - diff.ul[H] = aa.ul[H] - bb.ul[H] - (diff.ul[L] > aa.ul[L]); - return (diff.q); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/ucmpdi2.c b/external/bsd/pcc/dist/pcc-libs/libpcc/ucmpdi2.c deleted file mode 100644 index b60e6c7fc3da..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/ucmpdi2.c +++ /dev/null @@ -1,53 +0,0 @@ -/* Id: ucmpdi2.c,v 1.3 2009/03/15 00:20:42 gmcgarry Exp */ -/* $NetBSD: ucmpdi2.c,v 1.1.1.3 2010/06/03 18:58:14 plunky Exp $ */ -/* NetBSD: ucmpdi2.c,v 1.1 2005/12/20 19:28:51 christos Exp */ - -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * 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. 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 "quad.h" - -/* - * Return 0, 1, or 2 as a <, =, > b respectively. - * Neither a nor b are considered signed. - */ -int -__ucmpdi2(u_quad_t a, u_quad_t b) -{ - union uu aa, bb; - - aa.uq = a; - bb.uq = b; - return (aa.ul[H] < bb.ul[H] ? 0 : aa.ul[H] > bb.ul[H] ? 2 : - aa.ul[L] < bb.ul[L] ? 0 : aa.ul[L] > bb.ul[L] ? 2 : 1); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/udivdi3.c b/external/bsd/pcc/dist/pcc-libs/libpcc/udivdi3.c deleted file mode 100644 index e35b5eecebfc..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/udivdi3.c +++ /dev/null @@ -1,48 +0,0 @@ -/* Id: udivdi3.c,v 1.3 2009/03/15 00:20:42 gmcgarry Exp */ -/* $NetBSD: udivdi3.c,v 1.1.1.3 2010/06/03 18:58:14 plunky Exp $ */ -/* NetBSD: udivdi3.c,v 1.1 2005/12/20 19:28:51 christos Exp */ - -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * 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. 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 "quad.h" - -/* - * Divide two unsigned quads. - */ -u_quad_t -__udivdi3(u_quad_t a, u_quad_t b) -{ - - return (__qdivrem(a, b, (u_quad_t *)0)); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/umoddi3.c b/external/bsd/pcc/dist/pcc-libs/libpcc/umoddi3.c deleted file mode 100644 index 4133d893a4bc..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/umoddi3.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Id: umoddi3.c,v 1.3 2009/03/15 00:20:42 gmcgarry Exp */ -/* $NetBSD: umoddi3.c,v 1.1.1.3 2010/06/03 18:58:14 plunky Exp $ */ -/* NetBSD: umoddi3.c,v 1.1 2005/12/20 19:28:51 christos Exp */ - -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * 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. 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 "quad.h" - -/* - * Return remainder after dividing two unsigned quads. - */ -u_quad_t -__umoddi3(u_quad_t a, u_quad_t b) -{ - u_quad_t r; - - (void)__qdivrem(a, b, &r); - return (r); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libpcc/xordi3.c b/external/bsd/pcc/dist/pcc-libs/libpcc/xordi3.c deleted file mode 100644 index 6d2c89188b9c..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libpcc/xordi3.c +++ /dev/null @@ -1,53 +0,0 @@ -/* Id: xordi3.c,v 1.3 2009/03/15 00:20:42 gmcgarry Exp */ -/* $NetBSD: xordi3.c,v 1.1.1.3 2010/06/03 18:58:14 plunky Exp $ */ -/* NetBSD: xordi3.c,v 1.1 2005/12/20 19:28:51 christos Exp */ - -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * 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. 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 "quad.h" - -/* - * Return a ^ b, in quad. - */ -quad_t -__xordi3(quad_t a, quad_t b) -{ - union uu aa, bb; - - aa.q = a; - bb.q = b; - aa.ul[0] ^= bb.ul[0]; - aa.ul[1] ^= bb.ul[1]; - return (aa.q); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/Makefile.in b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/Makefile.in deleted file mode 100644 index 4fb776a689a3..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/Makefile.in +++ /dev/null @@ -1,59 +0,0 @@ -# Id: Makefile.in,v 1.7 2009/01/28 09:30:08 gmcgarry Exp -# $NetBSD: Makefile.in,v 1.1.1.3 2010/06/03 18:58:15 plunky Exp $ -# -# Makefile.in for libpccsoftfloat.a -# - -VPATH = @srcdir@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = @top_builddir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ -libdir = @libdir@ - -CC = @CC@ -TARGET = @target@ -TARGMACH = @targmach@ -VERSION = @version@ -PCCLIBDIR = $(libdir)/pcc/$(TARGET)/$(VERSION)/lib - -CPPFLAGS += @CPPFLAGS@ -DSOFTFLOAT_FOR_GCC -I$(srcdir) -I$(srcdir)/arch/$(TARGMACH) - -LIBS = @LIBS@ -AR = @AR@ -RANLIB = @RANLIB@ -INSTALL = @INSTALL@ - -OBJS += softfloat.o - -OBJS += fpgetround.o fpsetround.o fpgetmask.o fpsetmask.o \ - fpgetsticky.o fpsetsticky.o - -OBJSS += eqsf2.o nesf2.o gtsf2.o gesf2.o ltsf2.o lesf2.o negsf2.o \ - eqdf2.o nedf2.o gtdf2.o gedf2.o ltdf2.o ledf2.o negdf2.o \ - nexf2.o gtxf2.o gexf2.o negxf2.o unordsf2.o unorddf2.o - -DEST = libpccsoftfloat.a - -all: $(DEST) - -$(DEST): $(OBJS) - $(AR) r $@ $? - $(RANLIB) $@ - -softfloat.o : bits64/softfloat.c - $(CC) -O $(CPPFLAGS) $(CFLAGS) -c $< - -.c.o : - $(CC) -O $(CPPFLAGS) $(CFLAGS) -c $< - -install: - test -z "${DESTDIR}$(PCCLIBDIR)" || mkdir -p "${DESTDIR}$(PCCLIBDIR)" - $(INSTALL) -m 644 $(DEST) ${DESTDIR}$(PCCLIBDIR) - -clean: - /bin/rm -f $(OBJS) $(DEST) - -distclean: - /bin/rm -f Makefile diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/README.NetBSD b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/README.NetBSD deleted file mode 100644 index a2a7bda149b8..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/README.NetBSD +++ /dev/null @@ -1,8 +0,0 @@ -NetBSD: README.NetBSD,v 1.2 2002/05/21 23:51:05 bjh21 Exp - -This is a modified version of part of John Hauser's SoftFloat 2a package. -This version has been heavily modified to support its use with GCC to -implement built-in floating-point operations, but compiling -softfloat.c without SOFTFLOAT_FOR_GCC defined should get you the same -results as from the original. - diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/README.txt b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/README.txt deleted file mode 100644 index db6a9c390a50..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/README.txt +++ /dev/null @@ -1,39 +0,0 @@ -NetBSD: README.txt,v 1.1 2000/06/06 08:15:02 bjh21 Exp - -Package Overview for SoftFloat Release 2a - -John R. Hauser -1998 December 13 - - -SoftFloat is a software implementation of floating-point that conforms to -the IEC/IEEE Standard for Binary Floating-Point Arithmetic. SoftFloat is -distributed in the form of C source code. Compiling the SoftFloat sources -generates two things: - --- A SoftFloat object file (typically `softfloat.o') containing the complete - set of IEC/IEEE floating-point routines. - --- A `timesoftfloat' program for evaluating the speed of the SoftFloat - routines. (The SoftFloat module is linked into this program.) - -The SoftFloat package is documented in four text files: - - softfloat.txt Documentation for using the SoftFloat functions. - softfloat-source.txt Documentation for compiling SoftFloat. - softfloat-history.txt History of major changes to SoftFloat. - timesoftfloat.txt Documentation for using `timesoftfloat'. - -Other files in the package comprise the source code for SoftFloat. - -Please be aware that some work is involved in porting this software to other -targets. It is not just a matter of getting `make' to complete without -error messages. I would have written the code that way if I could, but -there are fundamental differences between systems that I can't make go away. -You should not attempt to compile SoftFloat without first reading both -`softfloat.txt' and `softfloat-source.txt'. - -At the time of this writing, the most up-to-date information about -SoftFloat and the latest release can be found at the Web page `http:// -HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/SoftFloat.html'. - diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/amd64/ieeefp.h b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/amd64/ieeefp.h deleted file mode 100644 index c588c1d24814..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/amd64/ieeefp.h +++ /dev/null @@ -1,26 +0,0 @@ -/* NetBSD: ieeefp.h,v 1.1 2003/02/26 21:26:10 fvdl Exp */ - -/* - * Written by J.T. Conklin, Apr 6, 1995 - * Public domain. - */ - -#ifndef _X86_IEEEFP_H_ -#define _X86_IEEEFP_H_ - -typedef int fp_except; -#define FP_X_INV 0x01 /* invalid operation exception */ -#define FP_X_DNML 0x02 /* denormalization exception */ -#define FP_X_DZ 0x04 /* divide-by-zero exception */ -#define FP_X_OFL 0x08 /* overflow exception */ -#define FP_X_UFL 0x10 /* underflow exception */ -#define FP_X_IMP 0x20 /* imprecise (loss of precision) */ - -typedef enum { - FP_RN=0, /* round to nearest representable number */ - FP_RM=1, /* round toward negative infinity */ - FP_RP=2, /* round toward positive infinity */ - FP_RZ=3 /* round to zero (truncate) */ -} fp_rnd; - -#endif /* _X86_IEEEFP_H_ */ diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/amd64/milieu.h b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/amd64/milieu.h deleted file mode 100644 index 566daf285bc4..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/amd64/milieu.h +++ /dev/null @@ -1,48 +0,0 @@ -/* NetBSD: milieu.h,v 1.1 2001/05/25 11:38:57 simonb Exp */ - -/* -=============================================================================== - -This C header file is part of the SoftFloat IEC/IEEE Floating-point -Arithmetic Package, Release 2a. - -Written by John R. Hauser. This work was made possible in part by the -International Computer Science Institute, located at Suite 600, 1947 Center -Street, Berkeley, California 94704. Funding was partially provided by the -National Science Foundation under grant MIP-9311980. The original version -of this code was written as part of a project to build a fixed-point vector -processor in collaboration with the University of California at Berkeley, -overseen by Profs. Nelson Morgan and John Wawrzynek. More information -is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ -arithmetic/SoftFloat.html'. - -THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. - -Derivative works are acceptable, even for commercial purposes, so long as -(1) they include prominent notice that the work is derivative, and (2) they -include prominent notice akin to these four paragraphs for those parts of -this code that are retained. - -=============================================================================== -*/ - -/* -------------------------------------------------------------------------------- -Include common integer types and flags. -------------------------------------------------------------------------------- -*/ -#include "x86_64-gcc.h" - -/* -------------------------------------------------------------------------------- -Symbolic Boolean literals. -------------------------------------------------------------------------------- -*/ -enum { - FALSE = 0, - TRUE = 1 -}; diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/amd64/softfloat.h b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/amd64/softfloat.h deleted file mode 100644 index de1ba978efc1..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/amd64/softfloat.h +++ /dev/null @@ -1,303 +0,0 @@ -/* NetBSD: softfloat.h,v 1.5 2006/05/16 20:55:51 mrg Exp */ - -/* This is a derivative work. */ - -/* -=============================================================================== - -This C header file is part of the SoftFloat IEC/IEEE Floating-point -Arithmetic Package, Release 2a. - -Written by John R. Hauser. This work was made possible in part by the -International Computer Science Institute, located at Suite 600, 1947 Center -Street, Berkeley, California 94704. Funding was partially provided by the -National Science Foundation under grant MIP-9311980. The original version -of this code was written as part of a project to build a fixed-point vector -processor in collaboration with the University of California at Berkeley, -overseen by Profs. Nelson Morgan and John Wawrzynek. More information -is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ -arithmetic/SoftFloat.html'. - -THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. - -Derivative works are acceptable, even for commercial purposes, so long as -(1) they include prominent notice that the work is derivative, and (2) they -include prominent notice akin to these four paragraphs for those parts of -this code that are retained. - -=============================================================================== -*/ - -/* -------------------------------------------------------------------------------- -The macro `FLOATX80' must be defined to enable the extended double-precision -floating-point format `floatx80'. If this macro is not defined, the -`floatx80' type will not be defined, and none of the functions that either -input or output the `floatx80' type will be defined. The same applies to -the `FLOAT128' macro and the quadruple-precision format `float128'. -------------------------------------------------------------------------------- -*/ -/* #define FLOATX80 */ -/* #define FLOAT128 */ - -#include "ieeefp.h" - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE floating-point types. -------------------------------------------------------------------------------- -*/ -typedef unsigned int float32; -typedef unsigned long long float64; -#ifdef FLOATX80 -typedef struct { - unsigned short high; - unsigned long long low; -} floatx80; -#endif -#ifdef FLOAT128 -typedef struct { - unsigned long long high, low; -} float128; -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE floating-point underflow tininess-detection mode. -------------------------------------------------------------------------------- -*/ -#ifndef SOFTFLOAT_FOR_GCC -extern int8 float_detect_tininess; -#endif -enum { - float_tininess_after_rounding = 0, - float_tininess_before_rounding = 1 -}; - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE floating-point rounding mode. -------------------------------------------------------------------------------- -*/ -extern fp_rnd float_rounding_mode; -enum { - float_round_nearest_even = FP_RN, - float_round_to_zero = FP_RZ, - float_round_down = FP_RM, - float_round_up = FP_RP -}; - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE floating-point exception flags. -------------------------------------------------------------------------------- -*/ -extern fp_except float_exception_flags; -extern fp_except float_exception_mask; -enum { - float_flag_inexact = FP_X_IMP, - float_flag_underflow = FP_X_UFL, - float_flag_overflow = FP_X_OFL, - float_flag_divbyzero = FP_X_DZ, - float_flag_invalid = FP_X_INV -}; - -/* -------------------------------------------------------------------------------- -Routine to raise any or all of the software IEC/IEEE floating-point -exception flags. -------------------------------------------------------------------------------- -*/ -void float_raise( fp_except ); - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE integer-to-floating-point conversion routines. -------------------------------------------------------------------------------- -*/ -float32 int32_to_float32( int ); -float64 int32_to_float64( int ); -#ifdef FLOATX80 -floatx80 int32_to_floatx80( int ); -#endif -#ifdef FLOAT128 -float128 int32_to_float128( int ); -#endif -float32 int64_to_float32( long long ); -float64 int64_to_float64( long long ); -#ifdef FLOATX80 -floatx80 int64_to_floatx80( long long ); -#endif -#ifdef FLOAT128 -float128 int64_to_float128( long long ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE single-precision conversion routines. -------------------------------------------------------------------------------- -*/ -int float32_to_int32( float32 ); -int float32_to_int32_round_to_zero( float32 ); -unsigned int float32_to_uint32_round_to_zero( float32 ); -long long float32_to_int64( float32 ); -long long float32_to_int64_round_to_zero( float32 ); -float64 float32_to_float64( float32 ); -#ifdef FLOATX80 -floatx80 float32_to_floatx80( float32 ); -#endif -#ifdef FLOAT128 -float128 float32_to_float128( float32 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE single-precision operations. -------------------------------------------------------------------------------- -*/ -float32 float32_round_to_int( float32 ); -float32 float32_add( float32, float32 ); -float32 float32_sub( float32, float32 ); -float32 float32_mul( float32, float32 ); -float32 float32_div( float32, float32 ); -float32 float32_rem( float32, float32 ); -float32 float32_sqrt( float32 ); -flag float32_eq( float32, float32 ); -flag float32_le( float32, float32 ); -flag float32_lt( float32, float32 ); -flag float32_eq_signaling( float32, float32 ); -flag float32_le_quiet( float32, float32 ); -flag float32_lt_quiet( float32, float32 ); -#ifndef SOFTFLOAT_FOR_GCC -flag float32_is_signaling_nan( float32 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE double-precision conversion routines. -------------------------------------------------------------------------------- -*/ -int float64_to_int32( float64 ); -int float64_to_int32_round_to_zero( float64 ); -unsigned int float64_to_uint32_round_to_zero( float64 ); -long long float64_to_int64( float64 ); -long long float64_to_int64_round_to_zero( float64 ); -float32 float64_to_float32( float64 ); -#ifdef FLOATX80 -floatx80 float64_to_floatx80( float64 ); -#endif -#ifdef FLOAT128 -float128 float64_to_float128( float64 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE double-precision operations. -------------------------------------------------------------------------------- -*/ -float64 float64_round_to_int( float64 ); -float64 float64_add( float64, float64 ); -float64 float64_sub( float64, float64 ); -float64 float64_mul( float64, float64 ); -float64 float64_div( float64, float64 ); -float64 float64_rem( float64, float64 ); -float64 float64_sqrt( float64 ); -flag float64_eq( float64, float64 ); -flag float64_le( float64, float64 ); -flag float64_lt( float64, float64 ); -flag float64_eq_signaling( float64, float64 ); -flag float64_le_quiet( float64, float64 ); -flag float64_lt_quiet( float64, float64 ); -#ifndef SOFTFLOAT_FOR_GCC -flag float64_is_signaling_nan( float64 ); -#endif - -#ifdef FLOATX80 - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE extended double-precision conversion routines. -------------------------------------------------------------------------------- -*/ -int floatx80_to_int32( floatx80 ); -int floatx80_to_int32_round_to_zero( floatx80 ); -long long floatx80_to_int64( floatx80 ); -long long floatx80_to_int64_round_to_zero( floatx80 ); -float32 floatx80_to_float32( floatx80 ); -float64 floatx80_to_float64( floatx80 ); -#ifdef FLOAT128 -float128 floatx80_to_float128( floatx80 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE extended double-precision rounding precision. Valid -values are 32, 64, and 80. -------------------------------------------------------------------------------- -*/ -extern int floatx80_rounding_precision; - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE extended double-precision operations. -------------------------------------------------------------------------------- -*/ -floatx80 floatx80_round_to_int( floatx80 ); -floatx80 floatx80_add( floatx80, floatx80 ); -floatx80 floatx80_sub( floatx80, floatx80 ); -floatx80 floatx80_mul( floatx80, floatx80 ); -floatx80 floatx80_div( floatx80, floatx80 ); -floatx80 floatx80_rem( floatx80, floatx80 ); -floatx80 floatx80_sqrt( floatx80 ); -flag floatx80_eq( floatx80, floatx80 ); -flag floatx80_le( floatx80, floatx80 ); -flag floatx80_lt( floatx80, floatx80 ); -flag floatx80_eq_signaling( floatx80, floatx80 ); -flag floatx80_le_quiet( floatx80, floatx80 ); -flag floatx80_lt_quiet( floatx80, floatx80 ); -flag floatx80_is_signaling_nan( floatx80 ); - -#endif - -#ifdef FLOAT128 - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE quadruple-precision conversion routines. -------------------------------------------------------------------------------- -*/ -int float128_to_int32( float128 ); -int float128_to_int32_round_to_zero( float128 ); -long long float128_to_int64( float128 ); -long long float128_to_int64_round_to_zero( float128 ); -float32 float128_to_float32( float128 ); -float64 float128_to_float64( float128 ); -#ifdef FLOATX80 -floatx80 float128_to_floatx80( float128 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE quadruple-precision operations. -------------------------------------------------------------------------------- -*/ -float128 float128_round_to_int( float128 ); -float128 float128_add( float128, float128 ); -float128 float128_sub( float128, float128 ); -float128 float128_mul( float128, float128 ); -float128 float128_div( float128, float128 ); -float128 float128_rem( float128, float128 ); -float128 float128_sqrt( float128 ); -flag float128_eq( float128, float128 ); -flag float128_le( float128, float128 ); -flag float128_lt( float128, float128 ); -flag float128_eq_signaling( float128, float128 ); -flag float128_le_quiet( float128, float128 ); -flag float128_lt_quiet( float128, float128 ); -flag float128_is_signaling_nan( float128 ); - -#endif diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/amd64/x86_64-gcc.h b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/amd64/x86_64-gcc.h deleted file mode 100644 index aa9e275cb773..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/amd64/x86_64-gcc.h +++ /dev/null @@ -1,83 +0,0 @@ -/* NetBSD: powerpc-gcc.h,v 1.2 2005/12/24 21:11:16 perry Exp */ - -/* -------------------------------------------------------------------------------- -One of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined. -------------------------------------------------------------------------------- -*/ -#define LITTLEENDIAN - -/* -------------------------------------------------------------------------------- -The macro `BITS64' can be defined to indicate that 64-bit integer types are -supported by the compiler. -------------------------------------------------------------------------------- -*/ -#define BITS64 - -/* -------------------------------------------------------------------------------- -Each of the following `typedef's defines the most convenient type that holds -integers of at least as many bits as specified. For example, `uint8' should -be the most convenient type that can hold unsigned integers of as many as -8 bits. The `flag' type must be able to hold either a 0 or 1. For most -implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed -to the same as `int'. -------------------------------------------------------------------------------- -*/ -typedef int flag; -typedef int uint8; -typedef int int8; -typedef int uint16; -typedef int int16; -typedef unsigned int uint32; -typedef signed int int32; -#ifdef BITS64 -typedef unsigned long long int uint64; -typedef signed long long int int64; -#endif - -/* -------------------------------------------------------------------------------- -Each of the following `typedef's defines a type that holds integers -of _exactly_ the number of bits specified. For instance, for most -implementation of C, `bits16' and `sbits16' should be `typedef'ed to -`unsigned short int' and `signed short int' (or `short int'), respectively. -------------------------------------------------------------------------------- -*/ -typedef unsigned char bits8; -typedef signed char sbits8; -typedef unsigned short int bits16; -typedef signed short int sbits16; -typedef unsigned int bits32; -typedef signed int sbits32; -#ifdef BITS64 -typedef unsigned long long int bits64; -typedef signed long long int sbits64; -#endif - -#ifdef BITS64 -/* -------------------------------------------------------------------------------- -The `LIT64' macro takes as its argument a textual integer literal and -if necessary ``marks'' the literal as having a 64-bit integer type. -For example, the GNU C Compiler (`gcc') requires that 64-bit literals be -appended with the letters `LL' standing for `long long', which is `gcc's -name for the 64-bit integer type. Some compilers may allow `LIT64' to be -defined as the identity macro: `#define LIT64( a ) a'. -------------------------------------------------------------------------------- -*/ -#define LIT64( a ) a##LL -#endif - -/* -------------------------------------------------------------------------------- -The macro `INLINE' can be used before functions that should be inlined. If -a compiler does not support explicit inlining, this macro should be defined -to be `static'. -------------------------------------------------------------------------------- -*/ -#define INLINE static inline - -#define FLOAT64_DEMANGLE(a) (a) -#define FLOAT64_MANGLE(a) (a) diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/arm/arm-gcc.h b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/arm/arm-gcc.h deleted file mode 100644 index b77eb48c627e..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/arm/arm-gcc.h +++ /dev/null @@ -1,100 +0,0 @@ -/* NetBSD: arm-gcc.h,v 1.3 2005/12/24 21:11:16 perry Exp */ - -/* -------------------------------------------------------------------------------- -One of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined. -------------------------------------------------------------------------------- -*/ -#ifdef __ARMEB__ -#define BIGENDIAN -#else -#define LITTLEENDIAN -#endif - -/* -------------------------------------------------------------------------------- -The macro `BITS64' can be defined to indicate that 64-bit integer types are -supported by the compiler. -------------------------------------------------------------------------------- -*/ -#define BITS64 - -/* -------------------------------------------------------------------------------- -Each of the following `typedef's defines the most convenient type that holds -integers of at least as many bits as specified. For example, `uint8' should -be the most convenient type that can hold unsigned integers of as many as -8 bits. The `flag' type must be able to hold either a 0 or 1. For most -implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed -to the same as `int'. -------------------------------------------------------------------------------- -*/ -typedef int flag; -typedef int uint8; -typedef int int8; -typedef int uint16; -typedef int int16; -typedef unsigned int uint32; -typedef signed int int32; -#ifdef BITS64 -typedef unsigned long long int uint64; -typedef signed long long int int64; -#endif - -/* -------------------------------------------------------------------------------- -Each of the following `typedef's defines a type that holds integers -of _exactly_ the number of bits specified. For instance, for most -implementation of C, `bits16' and `sbits16' should be `typedef'ed to -`unsigned short int' and `signed short int' (or `short int'), respectively. -------------------------------------------------------------------------------- -*/ -typedef unsigned char bits8; -typedef signed char sbits8; -typedef unsigned short int bits16; -typedef signed short int sbits16; -typedef unsigned int bits32; -typedef signed int sbits32; -#ifdef BITS64 -typedef unsigned long long int bits64; -typedef signed long long int sbits64; -#endif - -#ifdef BITS64 -/* -------------------------------------------------------------------------------- -The `LIT64' macro takes as its argument a textual integer literal and -if necessary ``marks'' the literal as having a 64-bit integer type. -For example, the GNU C Compiler (`gcc') requires that 64-bit literals be -appended with the letters `LL' standing for `long long', which is `gcc's -name for the 64-bit integer type. Some compilers may allow `LIT64' to be -defined as the identity macro: `#define LIT64( a ) a'. -------------------------------------------------------------------------------- -*/ -#define LIT64( a ) a##LL -#endif - -/* -------------------------------------------------------------------------------- -The macro `INLINE' can be used before functions that should be inlined. If -a compiler does not support explicit inlining, this macro should be defined -to be `static'. -------------------------------------------------------------------------------- -*/ -#define INLINE static inline - -/* -------------------------------------------------------------------------------- -The ARM FPA is odd in that it stores doubles high-order word first, no matter -what the endianness of the CPU. VFP is sane. -------------------------------------------------------------------------------- -*/ -#if defined(SOFTFLOAT_FOR_GCC) -#if defined(__VFP_FP__) || defined(__ARMEB__) -#define FLOAT64_DEMANGLE(a) (a) -#define FLOAT64_MANGLE(a) (a) -#else -#define FLOAT64_DEMANGLE(a) (((a) << 32) | ((a) >> 32)) -#define FLOAT64_MANGLE(a) FLOAT64_DEMANGLE(a) -#endif -#endif diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/arm/milieu.h b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/arm/milieu.h deleted file mode 100644 index e826fd6836c4..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/arm/milieu.h +++ /dev/null @@ -1,48 +0,0 @@ -/* NetBSD: milieu.h,v 1.1 2000/12/29 20:13:54 bjh21 Exp */ - -/* -=============================================================================== - -This C header file is part of the SoftFloat IEC/IEEE Floating-point -Arithmetic Package, Release 2a. - -Written by John R. Hauser. This work was made possible in part by the -International Computer Science Institute, located at Suite 600, 1947 Center -Street, Berkeley, California 94704. Funding was partially provided by the -National Science Foundation under grant MIP-9311980. The original version -of this code was written as part of a project to build a fixed-point vector -processor in collaboration with the University of California at Berkeley, -overseen by Profs. Nelson Morgan and John Wawrzynek. More information -is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ -arithmetic/SoftFloat.html'. - -THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. - -Derivative works are acceptable, even for commercial purposes, so long as -(1) they include prominent notice that the work is derivative, and (2) they -include prominent notice akin to these four paragraphs for those parts of -this code that are retained. - -=============================================================================== -*/ - -/* -------------------------------------------------------------------------------- -Include common integer types and flags. -------------------------------------------------------------------------------- -*/ -#include "arm-gcc.h" - -/* -------------------------------------------------------------------------------- -Symbolic Boolean literals. -------------------------------------------------------------------------------- -*/ -enum { - FALSE = 0, - TRUE = 1 -}; diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/arm/softfloat.h b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/arm/softfloat.h deleted file mode 100644 index 1e7520559698..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/arm/softfloat.h +++ /dev/null @@ -1,314 +0,0 @@ -/* NetBSD: softfloat.h,v 1.7 2006/05/16 20:55:51 mrg Exp */ - -/* This is a derivative work. */ - -/* -=============================================================================== - -This C header file is part of the SoftFloat IEC/IEEE Floating-point -Arithmetic Package, Release 2a. - -Written by John R. Hauser. This work was made possible in part by the -International Computer Science Institute, located at Suite 600, 1947 Center -Street, Berkeley, California 94704. Funding was partially provided by the -National Science Foundation under grant MIP-9311980. The original version -of this code was written as part of a project to build a fixed-point vector -processor in collaboration with the University of California at Berkeley, -overseen by Profs. Nelson Morgan and John Wawrzynek. More information -is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ -arithmetic/SoftFloat.html'. - -THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. - -Derivative works are acceptable, even for commercial purposes, so long as -(1) they include prominent notice that the work is derivative, and (2) they -include prominent notice akin to these four paragraphs for those parts of -this code that are retained. - -=============================================================================== -*/ - -/* -------------------------------------------------------------------------------- -The macro `FLOATX80' must be defined to enable the extended double-precision -floating-point format `floatx80'. If this macro is not defined, the -`floatx80' type will not be defined, and none of the functions that either -input or output the `floatx80' type will be defined. The same applies to -the `FLOAT128' macro and the quadruple-precision format `float128'. -------------------------------------------------------------------------------- -*/ -/* #define FLOATX80 */ -/* #define FLOAT128 */ - -#include - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE floating-point types. -------------------------------------------------------------------------------- -*/ -typedef unsigned int float32; -typedef unsigned long long float64; -#ifdef FLOATX80 -typedef struct { - unsigned short high; - unsigned long long low; -} floatx80; -#endif -#ifdef FLOAT128 -typedef struct { - unsigned long long high, low; -} float128; -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE floating-point underflow tininess-detection mode. -------------------------------------------------------------------------------- -*/ -#ifndef SOFTFLOAT_FOR_GCC -extern int float_detect_tininess; -#endif -enum { - float_tininess_after_rounding = 0, - float_tininess_before_rounding = 1 -}; - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE floating-point rounding mode. -------------------------------------------------------------------------------- -*/ -extern fp_rnd float_rounding_mode; -enum { - float_round_nearest_even = FP_RN, - float_round_to_zero = FP_RZ, - float_round_down = FP_RM, - float_round_up = FP_RP -}; - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE floating-point exception flags. -------------------------------------------------------------------------------- -*/ -extern fp_except float_exception_flags; -extern fp_except float_exception_mask; -enum { - float_flag_inexact = FP_X_IMP, - float_flag_underflow = FP_X_UFL, - float_flag_overflow = FP_X_OFL, - float_flag_divbyzero = FP_X_DZ, - float_flag_invalid = FP_X_INV -}; - -/* -------------------------------------------------------------------------------- -Routine to raise any or all of the software IEC/IEEE floating-point -exception flags. -------------------------------------------------------------------------------- -*/ -void float_raise( fp_except ); - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE integer-to-floating-point conversion routines. -------------------------------------------------------------------------------- -*/ -float32 int32_to_float32( int ); -float64 int32_to_float64( int ); -#ifdef FLOATX80 -floatx80 int32_to_floatx80( int ); -#endif -#ifdef FLOAT128 -float128 int32_to_float128( int ); -#endif -#ifndef SOFTFLOAT_FOR_GCC /* __floatdi?f is in libgcc2.c */ -float32 int64_to_float32( long long ); -float64 int64_to_float64( long long ); -#ifdef FLOATX80 -floatx80 int64_to_floatx80( long long ); -#endif -#ifdef FLOAT128 -float128 int64_to_float128( long long ); -#endif -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE single-precision conversion routines. -------------------------------------------------------------------------------- -*/ -int float32_to_int32( float32 ); -int float32_to_int32_round_to_zero( float32 ); -#if defined(SOFTFLOAT_FOR_GCC) && defined(SOFTFLOAT_NEED_FIXUNS) -unsigned int float32_to_uint32_round_to_zero( float32 ); -#endif -#ifndef SOFTFLOAT_FOR_GCC /* __fix?fdi provided by libgcc2.c */ -long long float32_to_int64( float32 ); -long long float32_to_int64_round_to_zero( float32 ); -#endif -float64 float32_to_float64( float32 ); -#ifdef FLOATX80 -floatx80 float32_to_floatx80( float32 ); -#endif -#ifdef FLOAT128 -float128 float32_to_float128( float32 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE single-precision operations. -------------------------------------------------------------------------------- -*/ -float32 float32_round_to_int( float32 ); -float32 float32_add( float32, float32 ); -float32 float32_sub( float32, float32 ); -float32 float32_mul( float32, float32 ); -float32 float32_div( float32, float32 ); -float32 float32_rem( float32, float32 ); -float32 float32_sqrt( float32 ); -int float32_eq( float32, float32 ); -int float32_le( float32, float32 ); -int float32_lt( float32, float32 ); -int float32_eq_signaling( float32, float32 ); -int float32_le_quiet( float32, float32 ); -int float32_lt_quiet( float32, float32 ); -#ifndef SOFTFLOAT_FOR_GCC -int float32_is_signaling_nan( float32 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE double-precision conversion routines. -------------------------------------------------------------------------------- -*/ -int float64_to_int32( float64 ); -int float64_to_int32_round_to_zero( float64 ); -#if defined(SOFTFLOAT_FOR_GCC) && defined(SOFTFLOAT_NEED_FIXUNS) -unsigned int float64_to_uint32_round_to_zero( float64 ); -#endif -#ifndef SOFTFLOAT_FOR_GCC /* __fix?fdi provided by libgcc2.c */ -long long float64_to_int64( float64 ); -long long float64_to_int64_round_to_zero( float64 ); -#endif -float32 float64_to_float32( float64 ); -#ifdef FLOATX80 -floatx80 float64_to_floatx80( float64 ); -#endif -#ifdef FLOAT128 -float128 float64_to_float128( float64 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE double-precision operations. -------------------------------------------------------------------------------- -*/ -float64 float64_round_to_int( float64 ); -float64 float64_add( float64, float64 ); -float64 float64_sub( float64, float64 ); -float64 float64_mul( float64, float64 ); -float64 float64_div( float64, float64 ); -float64 float64_rem( float64, float64 ); -float64 float64_sqrt( float64 ); -int float64_eq( float64, float64 ); -int float64_le( float64, float64 ); -int float64_lt( float64, float64 ); -int float64_eq_signaling( float64, float64 ); -int float64_le_quiet( float64, float64 ); -int float64_lt_quiet( float64, float64 ); -#ifndef SOFTFLOAT_FOR_GCC -int float64_is_signaling_nan( float64 ); -#endif - -#ifdef FLOATX80 - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE extended double-precision conversion routines. -------------------------------------------------------------------------------- -*/ -int floatx80_to_int32( floatx80 ); -int floatx80_to_int32_round_to_zero( floatx80 ); -long long floatx80_to_int64( floatx80 ); -long long floatx80_to_int64_round_to_zero( floatx80 ); -float32 floatx80_to_float32( floatx80 ); -float64 floatx80_to_float64( floatx80 ); -#ifdef FLOAT128 -float128 floatx80_to_float128( floatx80 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE extended double-precision rounding precision. Valid -values are 32, 64, and 80. -------------------------------------------------------------------------------- -*/ -extern int floatx80_rounding_precision; - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE extended double-precision operations. -------------------------------------------------------------------------------- -*/ -floatx80 floatx80_round_to_int( floatx80 ); -floatx80 floatx80_add( floatx80, floatx80 ); -floatx80 floatx80_sub( floatx80, floatx80 ); -floatx80 floatx80_mul( floatx80, floatx80 ); -floatx80 floatx80_div( floatx80, floatx80 ); -floatx80 floatx80_rem( floatx80, floatx80 ); -floatx80 floatx80_sqrt( floatx80 ); -int floatx80_eq( floatx80, floatx80 ); -int floatx80_le( floatx80, floatx80 ); -int floatx80_lt( floatx80, floatx80 ); -int floatx80_eq_signaling( floatx80, floatx80 ); -int floatx80_le_quiet( floatx80, floatx80 ); -int floatx80_lt_quiet( floatx80, floatx80 ); -int floatx80_is_signaling_nan( floatx80 ); - -#endif - -#ifdef FLOAT128 - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE quadruple-precision conversion routines. -------------------------------------------------------------------------------- -*/ -int float128_to_int32( float128 ); -int float128_to_int32_round_to_zero( float128 ); -long long float128_to_int64( float128 ); -long long float128_to_int64_round_to_zero( float128 ); -float32 float128_to_float32( float128 ); -float64 float128_to_float64( float128 ); -#ifdef FLOATX80 -floatx80 float128_to_floatx80( float128 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE quadruple-precision operations. -------------------------------------------------------------------------------- -*/ -float128 float128_round_to_int( float128 ); -float128 float128_add( float128, float128 ); -float128 float128_sub( float128, float128 ); -float128 float128_mul( float128, float128 ); -float128 float128_div( float128, float128 ); -float128 float128_rem( float128, float128 ); -float128 float128_sqrt( float128 ); -int float128_eq( float128, float128 ); -int float128_le( float128, float128 ); -int float128_lt( float128, float128 ); -int float128_eq_signaling( float128, float128 ); -int float128_le_quiet( float128, float128 ); -int float128_lt_quiet( float128, float128 ); -int float128_is_signaling_nan( float128 ); - -#endif - diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/i386/i386-gcc.h b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/i386/i386-gcc.h deleted file mode 100644 index aa9e275cb773..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/i386/i386-gcc.h +++ /dev/null @@ -1,83 +0,0 @@ -/* NetBSD: powerpc-gcc.h,v 1.2 2005/12/24 21:11:16 perry Exp */ - -/* -------------------------------------------------------------------------------- -One of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined. -------------------------------------------------------------------------------- -*/ -#define LITTLEENDIAN - -/* -------------------------------------------------------------------------------- -The macro `BITS64' can be defined to indicate that 64-bit integer types are -supported by the compiler. -------------------------------------------------------------------------------- -*/ -#define BITS64 - -/* -------------------------------------------------------------------------------- -Each of the following `typedef's defines the most convenient type that holds -integers of at least as many bits as specified. For example, `uint8' should -be the most convenient type that can hold unsigned integers of as many as -8 bits. The `flag' type must be able to hold either a 0 or 1. For most -implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed -to the same as `int'. -------------------------------------------------------------------------------- -*/ -typedef int flag; -typedef int uint8; -typedef int int8; -typedef int uint16; -typedef int int16; -typedef unsigned int uint32; -typedef signed int int32; -#ifdef BITS64 -typedef unsigned long long int uint64; -typedef signed long long int int64; -#endif - -/* -------------------------------------------------------------------------------- -Each of the following `typedef's defines a type that holds integers -of _exactly_ the number of bits specified. For instance, for most -implementation of C, `bits16' and `sbits16' should be `typedef'ed to -`unsigned short int' and `signed short int' (or `short int'), respectively. -------------------------------------------------------------------------------- -*/ -typedef unsigned char bits8; -typedef signed char sbits8; -typedef unsigned short int bits16; -typedef signed short int sbits16; -typedef unsigned int bits32; -typedef signed int sbits32; -#ifdef BITS64 -typedef unsigned long long int bits64; -typedef signed long long int sbits64; -#endif - -#ifdef BITS64 -/* -------------------------------------------------------------------------------- -The `LIT64' macro takes as its argument a textual integer literal and -if necessary ``marks'' the literal as having a 64-bit integer type. -For example, the GNU C Compiler (`gcc') requires that 64-bit literals be -appended with the letters `LL' standing for `long long', which is `gcc's -name for the 64-bit integer type. Some compilers may allow `LIT64' to be -defined as the identity macro: `#define LIT64( a ) a'. -------------------------------------------------------------------------------- -*/ -#define LIT64( a ) a##LL -#endif - -/* -------------------------------------------------------------------------------- -The macro `INLINE' can be used before functions that should be inlined. If -a compiler does not support explicit inlining, this macro should be defined -to be `static'. -------------------------------------------------------------------------------- -*/ -#define INLINE static inline - -#define FLOAT64_DEMANGLE(a) (a) -#define FLOAT64_MANGLE(a) (a) diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/i386/ieeefp.h b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/i386/ieeefp.h deleted file mode 100644 index c588c1d24814..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/i386/ieeefp.h +++ /dev/null @@ -1,26 +0,0 @@ -/* NetBSD: ieeefp.h,v 1.1 2003/02/26 21:26:10 fvdl Exp */ - -/* - * Written by J.T. Conklin, Apr 6, 1995 - * Public domain. - */ - -#ifndef _X86_IEEEFP_H_ -#define _X86_IEEEFP_H_ - -typedef int fp_except; -#define FP_X_INV 0x01 /* invalid operation exception */ -#define FP_X_DNML 0x02 /* denormalization exception */ -#define FP_X_DZ 0x04 /* divide-by-zero exception */ -#define FP_X_OFL 0x08 /* overflow exception */ -#define FP_X_UFL 0x10 /* underflow exception */ -#define FP_X_IMP 0x20 /* imprecise (loss of precision) */ - -typedef enum { - FP_RN=0, /* round to nearest representable number */ - FP_RM=1, /* round toward negative infinity */ - FP_RP=2, /* round toward positive infinity */ - FP_RZ=3 /* round to zero (truncate) */ -} fp_rnd; - -#endif /* _X86_IEEEFP_H_ */ diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/i386/milieu.h b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/i386/milieu.h deleted file mode 100644 index 76ffa3d99840..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/i386/milieu.h +++ /dev/null @@ -1,48 +0,0 @@ -/* NetBSD: milieu.h,v 1.1 2001/05/25 11:38:57 simonb Exp */ - -/* -=============================================================================== - -This C header file is part of the SoftFloat IEC/IEEE Floating-point -Arithmetic Package, Release 2a. - -Written by John R. Hauser. This work was made possible in part by the -International Computer Science Institute, located at Suite 600, 1947 Center -Street, Berkeley, California 94704. Funding was partially provided by the -National Science Foundation under grant MIP-9311980. The original version -of this code was written as part of a project to build a fixed-point vector -processor in collaboration with the University of California at Berkeley, -overseen by Profs. Nelson Morgan and John Wawrzynek. More information -is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ -arithmetic/SoftFloat.html'. - -THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. - -Derivative works are acceptable, even for commercial purposes, so long as -(1) they include prominent notice that the work is derivative, and (2) they -include prominent notice akin to these four paragraphs for those parts of -this code that are retained. - -=============================================================================== -*/ - -/* -------------------------------------------------------------------------------- -Include common integer types and flags. -------------------------------------------------------------------------------- -*/ -#include "i386-gcc.h" - -/* -------------------------------------------------------------------------------- -Symbolic Boolean literals. -------------------------------------------------------------------------------- -*/ -enum { - FALSE = 0, - TRUE = 1 -}; diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/i386/softfloat.h b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/i386/softfloat.h deleted file mode 100644 index de1ba978efc1..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/i386/softfloat.h +++ /dev/null @@ -1,303 +0,0 @@ -/* NetBSD: softfloat.h,v 1.5 2006/05/16 20:55:51 mrg Exp */ - -/* This is a derivative work. */ - -/* -=============================================================================== - -This C header file is part of the SoftFloat IEC/IEEE Floating-point -Arithmetic Package, Release 2a. - -Written by John R. Hauser. This work was made possible in part by the -International Computer Science Institute, located at Suite 600, 1947 Center -Street, Berkeley, California 94704. Funding was partially provided by the -National Science Foundation under grant MIP-9311980. The original version -of this code was written as part of a project to build a fixed-point vector -processor in collaboration with the University of California at Berkeley, -overseen by Profs. Nelson Morgan and John Wawrzynek. More information -is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ -arithmetic/SoftFloat.html'. - -THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. - -Derivative works are acceptable, even for commercial purposes, so long as -(1) they include prominent notice that the work is derivative, and (2) they -include prominent notice akin to these four paragraphs for those parts of -this code that are retained. - -=============================================================================== -*/ - -/* -------------------------------------------------------------------------------- -The macro `FLOATX80' must be defined to enable the extended double-precision -floating-point format `floatx80'. If this macro is not defined, the -`floatx80' type will not be defined, and none of the functions that either -input or output the `floatx80' type will be defined. The same applies to -the `FLOAT128' macro and the quadruple-precision format `float128'. -------------------------------------------------------------------------------- -*/ -/* #define FLOATX80 */ -/* #define FLOAT128 */ - -#include "ieeefp.h" - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE floating-point types. -------------------------------------------------------------------------------- -*/ -typedef unsigned int float32; -typedef unsigned long long float64; -#ifdef FLOATX80 -typedef struct { - unsigned short high; - unsigned long long low; -} floatx80; -#endif -#ifdef FLOAT128 -typedef struct { - unsigned long long high, low; -} float128; -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE floating-point underflow tininess-detection mode. -------------------------------------------------------------------------------- -*/ -#ifndef SOFTFLOAT_FOR_GCC -extern int8 float_detect_tininess; -#endif -enum { - float_tininess_after_rounding = 0, - float_tininess_before_rounding = 1 -}; - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE floating-point rounding mode. -------------------------------------------------------------------------------- -*/ -extern fp_rnd float_rounding_mode; -enum { - float_round_nearest_even = FP_RN, - float_round_to_zero = FP_RZ, - float_round_down = FP_RM, - float_round_up = FP_RP -}; - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE floating-point exception flags. -------------------------------------------------------------------------------- -*/ -extern fp_except float_exception_flags; -extern fp_except float_exception_mask; -enum { - float_flag_inexact = FP_X_IMP, - float_flag_underflow = FP_X_UFL, - float_flag_overflow = FP_X_OFL, - float_flag_divbyzero = FP_X_DZ, - float_flag_invalid = FP_X_INV -}; - -/* -------------------------------------------------------------------------------- -Routine to raise any or all of the software IEC/IEEE floating-point -exception flags. -------------------------------------------------------------------------------- -*/ -void float_raise( fp_except ); - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE integer-to-floating-point conversion routines. -------------------------------------------------------------------------------- -*/ -float32 int32_to_float32( int ); -float64 int32_to_float64( int ); -#ifdef FLOATX80 -floatx80 int32_to_floatx80( int ); -#endif -#ifdef FLOAT128 -float128 int32_to_float128( int ); -#endif -float32 int64_to_float32( long long ); -float64 int64_to_float64( long long ); -#ifdef FLOATX80 -floatx80 int64_to_floatx80( long long ); -#endif -#ifdef FLOAT128 -float128 int64_to_float128( long long ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE single-precision conversion routines. -------------------------------------------------------------------------------- -*/ -int float32_to_int32( float32 ); -int float32_to_int32_round_to_zero( float32 ); -unsigned int float32_to_uint32_round_to_zero( float32 ); -long long float32_to_int64( float32 ); -long long float32_to_int64_round_to_zero( float32 ); -float64 float32_to_float64( float32 ); -#ifdef FLOATX80 -floatx80 float32_to_floatx80( float32 ); -#endif -#ifdef FLOAT128 -float128 float32_to_float128( float32 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE single-precision operations. -------------------------------------------------------------------------------- -*/ -float32 float32_round_to_int( float32 ); -float32 float32_add( float32, float32 ); -float32 float32_sub( float32, float32 ); -float32 float32_mul( float32, float32 ); -float32 float32_div( float32, float32 ); -float32 float32_rem( float32, float32 ); -float32 float32_sqrt( float32 ); -flag float32_eq( float32, float32 ); -flag float32_le( float32, float32 ); -flag float32_lt( float32, float32 ); -flag float32_eq_signaling( float32, float32 ); -flag float32_le_quiet( float32, float32 ); -flag float32_lt_quiet( float32, float32 ); -#ifndef SOFTFLOAT_FOR_GCC -flag float32_is_signaling_nan( float32 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE double-precision conversion routines. -------------------------------------------------------------------------------- -*/ -int float64_to_int32( float64 ); -int float64_to_int32_round_to_zero( float64 ); -unsigned int float64_to_uint32_round_to_zero( float64 ); -long long float64_to_int64( float64 ); -long long float64_to_int64_round_to_zero( float64 ); -float32 float64_to_float32( float64 ); -#ifdef FLOATX80 -floatx80 float64_to_floatx80( float64 ); -#endif -#ifdef FLOAT128 -float128 float64_to_float128( float64 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE double-precision operations. -------------------------------------------------------------------------------- -*/ -float64 float64_round_to_int( float64 ); -float64 float64_add( float64, float64 ); -float64 float64_sub( float64, float64 ); -float64 float64_mul( float64, float64 ); -float64 float64_div( float64, float64 ); -float64 float64_rem( float64, float64 ); -float64 float64_sqrt( float64 ); -flag float64_eq( float64, float64 ); -flag float64_le( float64, float64 ); -flag float64_lt( float64, float64 ); -flag float64_eq_signaling( float64, float64 ); -flag float64_le_quiet( float64, float64 ); -flag float64_lt_quiet( float64, float64 ); -#ifndef SOFTFLOAT_FOR_GCC -flag float64_is_signaling_nan( float64 ); -#endif - -#ifdef FLOATX80 - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE extended double-precision conversion routines. -------------------------------------------------------------------------------- -*/ -int floatx80_to_int32( floatx80 ); -int floatx80_to_int32_round_to_zero( floatx80 ); -long long floatx80_to_int64( floatx80 ); -long long floatx80_to_int64_round_to_zero( floatx80 ); -float32 floatx80_to_float32( floatx80 ); -float64 floatx80_to_float64( floatx80 ); -#ifdef FLOAT128 -float128 floatx80_to_float128( floatx80 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE extended double-precision rounding precision. Valid -values are 32, 64, and 80. -------------------------------------------------------------------------------- -*/ -extern int floatx80_rounding_precision; - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE extended double-precision operations. -------------------------------------------------------------------------------- -*/ -floatx80 floatx80_round_to_int( floatx80 ); -floatx80 floatx80_add( floatx80, floatx80 ); -floatx80 floatx80_sub( floatx80, floatx80 ); -floatx80 floatx80_mul( floatx80, floatx80 ); -floatx80 floatx80_div( floatx80, floatx80 ); -floatx80 floatx80_rem( floatx80, floatx80 ); -floatx80 floatx80_sqrt( floatx80 ); -flag floatx80_eq( floatx80, floatx80 ); -flag floatx80_le( floatx80, floatx80 ); -flag floatx80_lt( floatx80, floatx80 ); -flag floatx80_eq_signaling( floatx80, floatx80 ); -flag floatx80_le_quiet( floatx80, floatx80 ); -flag floatx80_lt_quiet( floatx80, floatx80 ); -flag floatx80_is_signaling_nan( floatx80 ); - -#endif - -#ifdef FLOAT128 - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE quadruple-precision conversion routines. -------------------------------------------------------------------------------- -*/ -int float128_to_int32( float128 ); -int float128_to_int32_round_to_zero( float128 ); -long long float128_to_int64( float128 ); -long long float128_to_int64_round_to_zero( float128 ); -float32 float128_to_float32( float128 ); -float64 float128_to_float64( float128 ); -#ifdef FLOATX80 -floatx80 float128_to_floatx80( float128 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE quadruple-precision operations. -------------------------------------------------------------------------------- -*/ -float128 float128_round_to_int( float128 ); -float128 float128_add( float128, float128 ); -float128 float128_sub( float128, float128 ); -float128 float128_mul( float128, float128 ); -float128 float128_div( float128, float128 ); -float128 float128_rem( float128, float128 ); -float128 float128_sqrt( float128 ); -flag float128_eq( float128, float128 ); -flag float128_le( float128, float128 ); -flag float128_lt( float128, float128 ); -flag float128_eq_signaling( float128, float128 ); -flag float128_le_quiet( float128, float128 ); -flag float128_lt_quiet( float128, float128 ); -flag float128_is_signaling_nan( float128 ); - -#endif diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/m68k/m68k-gcc.h b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/m68k/m68k-gcc.h deleted file mode 100644 index b6d4d015404e..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/m68k/m68k-gcc.h +++ /dev/null @@ -1,89 +0,0 @@ -/* NetBSD: m68k-gcc.h,v 1.2 2005/12/24 21:11:16 perry Exp */ - -/* -------------------------------------------------------------------------------- -One of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined. -------------------------------------------------------------------------------- -*/ -#include -#if _BYTE_ORDER == _BIG_ENDIAN -#define BIGENDIAN -#endif -#if _BYTE_ORDER == _LITTLE_ENDIAN -#define LITTLEENDIAN -#endif - -/* -------------------------------------------------------------------------------- -The macro `BITS64' can be defined to indicate that 64-bit integer types are -supported by the compiler. -------------------------------------------------------------------------------- -*/ -#define BITS64 - -/* -------------------------------------------------------------------------------- -Each of the following `typedef's defines the most convenient type that holds -integers of at least as many bits as specified. For example, `uint8' should -be the most convenient type that can hold unsigned integers of as many as -8 bits. The `flag' type must be able to hold either a 0 or 1. For most -implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed -to the same as `int'. -------------------------------------------------------------------------------- -*/ -typedef int flag; -typedef int uint8; -typedef int int8; -typedef int uint16; -typedef int int16; -typedef unsigned int uint32; -typedef signed int int32; -#ifdef BITS64 -typedef unsigned long long int uint64; -typedef signed long long int int64; -#endif - -/* -------------------------------------------------------------------------------- -Each of the following `typedef's defines a type that holds integers -of _exactly_ the number of bits specified. For instance, for most -implementation of C, `bits16' and `sbits16' should be `typedef'ed to -`unsigned short int' and `signed short int' (or `short int'), respectively. -------------------------------------------------------------------------------- -*/ -typedef unsigned char bits8; -typedef signed char sbits8; -typedef unsigned short int bits16; -typedef signed short int sbits16; -typedef unsigned int bits32; -typedef signed int sbits32; -#ifdef BITS64 -typedef unsigned long long int bits64; -typedef signed long long int sbits64; -#endif - -#ifdef BITS64 -/* -------------------------------------------------------------------------------- -The `LIT64' macro takes as its argument a textual integer literal and -if necessary ``marks'' the literal as having a 64-bit integer type. -For example, the GNU C Compiler (`gcc') requires that 64-bit literals be -appended with the letters `LL' standing for `long long', which is `gcc's -name for the 64-bit integer type. Some compilers may allow `LIT64' to be -defined as the identity macro: `#define LIT64( a ) a'. -------------------------------------------------------------------------------- -*/ -#define LIT64( a ) a##LL -#endif - -/* -------------------------------------------------------------------------------- -The macro `INLINE' can be used before functions that should be inlined. If -a compiler does not support explicit inlining, this macro should be defined -to be `static'. -------------------------------------------------------------------------------- -*/ -#define INLINE static inline - -#define FLOAT64_DEMANGLE(a) (a) -#define FLOAT64_MANGLE(a) (a) diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/m68k/milieu.h b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/m68k/milieu.h deleted file mode 100644 index 81fe1e2019cc..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/m68k/milieu.h +++ /dev/null @@ -1,48 +0,0 @@ -/* NetBSD: milieu.h,v 1.1 2004/09/26 21:13:27 jmmv Exp */ - -/* -=============================================================================== - -This C header file is part of the SoftFloat IEC/IEEE Floating-point -Arithmetic Package, Release 2a. - -Written by John R. Hauser. This work was made possible in part by the -International Computer Science Institute, located at Suite 600, 1947 Center -Street, Berkeley, California 94704. Funding was partially provided by the -National Science Foundation under grant MIP-9311980. The original version -of this code was written as part of a project to build a fixed-point vector -processor in collaboration with the University of California at Berkeley, -overseen by Profs. Nelson Morgan and John Wawrzynek. More information -is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ -arithmetic/SoftFloat.html'. - -THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. - -Derivative works are acceptable, even for commercial purposes, so long as -(1) they include prominent notice that the work is derivative, and (2) they -include prominent notice akin to these four paragraphs for those parts of -this code that are retained. - -=============================================================================== -*/ - -/* -------------------------------------------------------------------------------- -Include common integer types and flags. -------------------------------------------------------------------------------- -*/ -#include "m68k-gcc.h" - -/* -------------------------------------------------------------------------------- -Symbolic Boolean literals. -------------------------------------------------------------------------------- -*/ -enum { - FALSE = 0, - TRUE = 1 -}; diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/m68k/softfloat.h b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/m68k/softfloat.h deleted file mode 100644 index 00b1c551d01e..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/m68k/softfloat.h +++ /dev/null @@ -1,302 +0,0 @@ -/* NetBSD: softfloat.h,v 1.2 2006/05/16 20:55:51 mrg Exp */ - -/* This is a derivative work. */ - -/* -=============================================================================== - -This C header file is part of the SoftFloat IEC/IEEE Floating-point -Arithmetic Package, Release 2a. - -Written by John R. Hauser. This work was made possible in part by the -International Computer Science Institute, located at Suite 600, 1947 Center -Street, Berkeley, California 94704. Funding was partially provided by the -National Science Foundation under grant MIP-9311980. The original version -of this code was written as part of a project to build a fixed-point vector -processor in collaboration with the University of California at Berkeley, -overseen by Profs. Nelson Morgan and John Wawrzynek. More information -is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ -arithmetic/SoftFloat.html'. - -THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. - -Derivative works are acceptable, even for commercial purposes, so long as -(1) they include prominent notice that the work is derivative, and (2) they -include prominent notice akin to these four paragraphs for those parts of -this code that are retained. - -=============================================================================== -*/ - -/* -------------------------------------------------------------------------------- -The macro `FLOATX80' must be defined to enable the extended double-precision -floating-point format `floatx80'. If this macro is not defined, the -`floatx80' type will not be defined, and none of the functions that either -input or output the `floatx80' type will be defined. The same applies to -the `FLOAT128' macro and the quadruple-precision format `float128'. -------------------------------------------------------------------------------- -*/ -#define FLOATX80 -/* #define FLOAT128 */ - -#include - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE floating-point types. -------------------------------------------------------------------------------- -*/ -typedef unsigned int float32; -typedef unsigned long long float64; -#ifdef FLOATX80 -typedef struct { - unsigned short high; - unsigned long long low; -} floatx80; -#endif -#ifdef FLOAT128 -typedef struct { - unsigned long long high, low; -} float128; -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE floating-point underflow tininess-detection mode. -------------------------------------------------------------------------------- -*/ -#ifndef SOFTFLOAT_FOR_GCC -extern int8 float_detect_tininess; -#endif -enum { - float_tininess_after_rounding = 0, - float_tininess_before_rounding = 1 -}; - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE floating-point rounding mode. -------------------------------------------------------------------------------- -*/ -extern fp_rnd float_rounding_mode; -enum { - float_round_nearest_even = FP_RN, - float_round_to_zero = FP_RZ, - float_round_down = FP_RM, - float_round_up = FP_RP -}; - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE floating-point exception flags. -------------------------------------------------------------------------------- -*/ -extern fp_except float_exception_flags; -extern fp_except float_exception_mask; -enum { - float_flag_inexact = FP_X_IMP, - float_flag_underflow = FP_X_UFL, - float_flag_overflow = FP_X_OFL, - float_flag_divbyzero = FP_X_DZ, - float_flag_invalid = FP_X_INV -}; - -/* -------------------------------------------------------------------------------- -Routine to raise any or all of the software IEC/IEEE floating-point -exception flags. -------------------------------------------------------------------------------- -*/ -void float_raise( fp_except ); - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE integer-to-floating-point conversion routines. -------------------------------------------------------------------------------- -*/ -float32 int32_to_float32( int ); -float64 int32_to_float64( int ); -#ifdef FLOATX80 -floatx80 int32_to_floatx80( int ); -#endif -#ifdef FLOAT128 -float128 int32_to_float128( int ); -#endif -float32 int64_to_float32( long long ); -float64 int64_to_float64( long long ); -#ifdef FLOATX80 -floatx80 int64_to_floatx80( long long ); -#endif -#ifdef FLOAT128 -float128 int64_to_float128( long long ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE single-precision conversion routines. -------------------------------------------------------------------------------- -*/ -int float32_to_int32( float32 ); -int float32_to_int32_round_to_zero( float32 ); -unsigned int float32_to_uint32_round_to_zero( float32 ); -long long float32_to_int64( float32 ); -long long float32_to_int64_round_to_zero( float32 ); -float64 float32_to_float64( float32 ); -#ifdef FLOATX80 -floatx80 float32_to_floatx80( float32 ); -#endif -#ifdef FLOAT128 -float128 float32_to_float128( float32 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE single-precision operations. -------------------------------------------------------------------------------- -*/ -float32 float32_round_to_int( float32 ); -float32 float32_add( float32, float32 ); -float32 float32_sub( float32, float32 ); -float32 float32_mul( float32, float32 ); -float32 float32_div( float32, float32 ); -float32 float32_rem( float32, float32 ); -float32 float32_sqrt( float32 ); -flag float32_eq( float32, float32 ); -flag float32_le( float32, float32 ); -flag float32_lt( float32, float32 ); -flag float32_eq_signaling( float32, float32 ); -flag float32_le_quiet( float32, float32 ); -flag float32_lt_quiet( float32, float32 ); -#ifndef SOFTFLOAT_FOR_GCC -flag float32_is_signaling_nan( float32 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE double-precision conversion routines. -------------------------------------------------------------------------------- -*/ -int float64_to_int32( float64 ); -int float64_to_int32_round_to_zero( float64 ); -unsigned int float64_to_uint32_round_to_zero( float64 ); -long long float64_to_int64( float64 ); -long long float64_to_int64_round_to_zero( float64 ); -float32 float64_to_float32( float64 ); -#ifdef FLOATX80 -floatx80 float64_to_floatx80( float64 ); -#endif -#ifdef FLOAT128 -float128 float64_to_float128( float64 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE double-precision operations. -------------------------------------------------------------------------------- -*/ -float64 float64_round_to_int( float64 ); -float64 float64_add( float64, float64 ); -float64 float64_sub( float64, float64 ); -float64 float64_mul( float64, float64 ); -float64 float64_div( float64, float64 ); -float64 float64_rem( float64, float64 ); -float64 float64_sqrt( float64 ); -flag float64_eq( float64, float64 ); -flag float64_le( float64, float64 ); -flag float64_lt( float64, float64 ); -flag float64_eq_signaling( float64, float64 ); -flag float64_le_quiet( float64, float64 ); -flag float64_lt_quiet( float64, float64 ); -flag float64_is_signaling_nan( float64 ); - -#ifdef FLOATX80 - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE extended double-precision conversion routines. -------------------------------------------------------------------------------- -*/ -int floatx80_to_int32( floatx80 ); -int floatx80_to_int32_round_to_zero( floatx80 ); -long long floatx80_to_int64( floatx80 ); -long long floatx80_to_int64_round_to_zero( floatx80 ); -float32 floatx80_to_float32( floatx80 ); -float64 floatx80_to_float64( floatx80 ); -#ifdef FLOAT128 -float128 floatx80_to_float128( floatx80 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE extended double-precision rounding precision. Valid -values are 32, 64, and 80. -------------------------------------------------------------------------------- -*/ -extern int floatx80_rounding_precision; - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE extended double-precision operations. -------------------------------------------------------------------------------- -*/ -floatx80 floatx80_round_to_int( floatx80 ); -floatx80 floatx80_add( floatx80, floatx80 ); -floatx80 floatx80_sub( floatx80, floatx80 ); -floatx80 floatx80_mul( floatx80, floatx80 ); -floatx80 floatx80_div( floatx80, floatx80 ); -floatx80 floatx80_rem( floatx80, floatx80 ); -floatx80 floatx80_sqrt( floatx80 ); -flag floatx80_eq( floatx80, floatx80 ); -flag floatx80_le( floatx80, floatx80 ); -flag floatx80_lt( floatx80, floatx80 ); -flag floatx80_eq_signaling( floatx80, floatx80 ); -flag floatx80_le_quiet( floatx80, floatx80 ); -flag floatx80_lt_quiet( floatx80, floatx80 ); -flag floatx80_is_signaling_nan( floatx80 ); -flag floatx80_is_nan( floatx80 ); - -#endif - -#ifdef FLOAT128 - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE quadruple-precision conversion routines. -------------------------------------------------------------------------------- -*/ -int float128_to_int32( float128 ); -int float128_to_int32_round_to_zero( float128 ); -long long float128_to_int64( float128 ); -long long float128_to_int64_round_to_zero( float128 ); -float32 float128_to_float32( float128 ); -float64 float128_to_float64( float128 ); -#ifdef FLOATX80 -floatx80 float128_to_floatx80( float128 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE quadruple-precision operations. -------------------------------------------------------------------------------- -*/ -float128 float128_round_to_int( float128 ); -float128 float128_add( float128, float128 ); -float128 float128_sub( float128, float128 ); -float128 float128_mul( float128, float128 ); -float128 float128_div( float128, float128 ); -float128 float128_rem( float128, float128 ); -float128 float128_sqrt( float128 ); -flag float128_eq( float128, float128 ); -flag float128_le( float128, float128 ); -flag float128_lt( float128, float128 ); -flag float128_eq_signaling( float128, float128 ); -flag float128_le_quiet( float128, float128 ); -flag float128_lt_quiet( float128, float128 ); -flag float128_is_signaling_nan( float128 ); - -#endif diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/powerpc/ieeefp.h b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/powerpc/ieeefp.h deleted file mode 100644 index 2e36bd0a6e3c..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/powerpc/ieeefp.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Written by J.T. Conklin, Apr 6, 1995 - * Public domain. - */ - -#ifndef _POWERPC_IEEEFP_H_ -#define _POWERPC_IEEEFP_H_ - -typedef int fp_except; -#define FP_X_IMP 0x01 /* imprecise (loss of precision) */ -#define FP_X_DZ 0x02 /* divide-by-zero exception */ -#define FP_X_UFL 0x04 /* underflow exception */ -#define FP_X_OFL 0x08 /* overflow exception */ -#define FP_X_INV 0x10 /* invalid operation exception */ - -typedef enum { - FP_RN=0, /* round to nearest representable number */ - FP_RZ=1, /* round to zero (truncate) */ - FP_RP=2, /* round toward positive infinity */ - FP_RM=3 /* round toward negative infinity */ -} fp_rnd; - -#endif /* _POWERPC_IEEEFP_H_ */ diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/powerpc/milieu.h b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/powerpc/milieu.h deleted file mode 100644 index 8cccdb4322fb..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/powerpc/milieu.h +++ /dev/null @@ -1,48 +0,0 @@ -/* NetBSD: milieu.h,v 1.1 2001/05/25 11:38:57 simonb Exp */ - -/* -=============================================================================== - -This C header file is part of the SoftFloat IEC/IEEE Floating-point -Arithmetic Package, Release 2a. - -Written by John R. Hauser. This work was made possible in part by the -International Computer Science Institute, located at Suite 600, 1947 Center -Street, Berkeley, California 94704. Funding was partially provided by the -National Science Foundation under grant MIP-9311980. The original version -of this code was written as part of a project to build a fixed-point vector -processor in collaboration with the University of California at Berkeley, -overseen by Profs. Nelson Morgan and John Wawrzynek. More information -is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ -arithmetic/SoftFloat.html'. - -THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. - -Derivative works are acceptable, even for commercial purposes, so long as -(1) they include prominent notice that the work is derivative, and (2) they -include prominent notice akin to these four paragraphs for those parts of -this code that are retained. - -=============================================================================== -*/ - -/* -------------------------------------------------------------------------------- -Include common integer types and flags. -------------------------------------------------------------------------------- -*/ -#include "powerpc-gcc.h" - -/* -------------------------------------------------------------------------------- -Symbolic Boolean literals. -------------------------------------------------------------------------------- -*/ -enum { - FALSE = 0, - TRUE = 1 -}; diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/powerpc/powerpc-gcc.h b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/powerpc/powerpc-gcc.h deleted file mode 100644 index f231ba1bf734..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/powerpc/powerpc-gcc.h +++ /dev/null @@ -1,89 +0,0 @@ -/* NetBSD: powerpc-gcc.h,v 1.2 2005/12/24 21:11:16 perry Exp */ - -/* -------------------------------------------------------------------------------- -One of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined. -------------------------------------------------------------------------------- -*/ -#include -#if _BYTE_ORDER == _BIG_ENDIAN -#define BIGENDIAN -#endif -#if _BYTE_ORDER == _LITTLE_ENDIAN -#define LITTLEENDIAN -#endif - -/* -------------------------------------------------------------------------------- -The macro `BITS64' can be defined to indicate that 64-bit integer types are -supported by the compiler. -------------------------------------------------------------------------------- -*/ -#define BITS64 - -/* -------------------------------------------------------------------------------- -Each of the following `typedef's defines the most convenient type that holds -integers of at least as many bits as specified. For example, `uint8' should -be the most convenient type that can hold unsigned integers of as many as -8 bits. The `flag' type must be able to hold either a 0 or 1. For most -implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed -to the same as `int'. -------------------------------------------------------------------------------- -*/ -typedef int flag; -typedef int uint8; -typedef int int8; -typedef int uint16; -typedef int int16; -typedef unsigned int uint32; -typedef signed int int32; -#ifdef BITS64 -typedef unsigned long long int uint64; -typedef signed long long int int64; -#endif - -/* -------------------------------------------------------------------------------- -Each of the following `typedef's defines a type that holds integers -of _exactly_ the number of bits specified. For instance, for most -implementation of C, `bits16' and `sbits16' should be `typedef'ed to -`unsigned short int' and `signed short int' (or `short int'), respectively. -------------------------------------------------------------------------------- -*/ -typedef unsigned char bits8; -typedef signed char sbits8; -typedef unsigned short int bits16; -typedef signed short int sbits16; -typedef unsigned int bits32; -typedef signed int sbits32; -#ifdef BITS64 -typedef unsigned long long int bits64; -typedef signed long long int sbits64; -#endif - -#ifdef BITS64 -/* -------------------------------------------------------------------------------- -The `LIT64' macro takes as its argument a textual integer literal and -if necessary ``marks'' the literal as having a 64-bit integer type. -For example, the GNU C Compiler (`gcc') requires that 64-bit literals be -appended with the letters `LL' standing for `long long', which is `gcc's -name for the 64-bit integer type. Some compilers may allow `LIT64' to be -defined as the identity macro: `#define LIT64( a ) a'. -------------------------------------------------------------------------------- -*/ -#define LIT64( a ) a##LL -#endif - -/* -------------------------------------------------------------------------------- -The macro `INLINE' can be used before functions that should be inlined. If -a compiler does not support explicit inlining, this macro should be defined -to be `static'. -------------------------------------------------------------------------------- -*/ -#define INLINE static inline - -#define FLOAT64_DEMANGLE(a) (a) -#define FLOAT64_MANGLE(a) (a) diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/powerpc/softfloat.h b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/powerpc/softfloat.h deleted file mode 100644 index de1ba978efc1..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/powerpc/softfloat.h +++ /dev/null @@ -1,303 +0,0 @@ -/* NetBSD: softfloat.h,v 1.5 2006/05/16 20:55:51 mrg Exp */ - -/* This is a derivative work. */ - -/* -=============================================================================== - -This C header file is part of the SoftFloat IEC/IEEE Floating-point -Arithmetic Package, Release 2a. - -Written by John R. Hauser. This work was made possible in part by the -International Computer Science Institute, located at Suite 600, 1947 Center -Street, Berkeley, California 94704. Funding was partially provided by the -National Science Foundation under grant MIP-9311980. The original version -of this code was written as part of a project to build a fixed-point vector -processor in collaboration with the University of California at Berkeley, -overseen by Profs. Nelson Morgan and John Wawrzynek. More information -is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ -arithmetic/SoftFloat.html'. - -THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. - -Derivative works are acceptable, even for commercial purposes, so long as -(1) they include prominent notice that the work is derivative, and (2) they -include prominent notice akin to these four paragraphs for those parts of -this code that are retained. - -=============================================================================== -*/ - -/* -------------------------------------------------------------------------------- -The macro `FLOATX80' must be defined to enable the extended double-precision -floating-point format `floatx80'. If this macro is not defined, the -`floatx80' type will not be defined, and none of the functions that either -input or output the `floatx80' type will be defined. The same applies to -the `FLOAT128' macro and the quadruple-precision format `float128'. -------------------------------------------------------------------------------- -*/ -/* #define FLOATX80 */ -/* #define FLOAT128 */ - -#include "ieeefp.h" - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE floating-point types. -------------------------------------------------------------------------------- -*/ -typedef unsigned int float32; -typedef unsigned long long float64; -#ifdef FLOATX80 -typedef struct { - unsigned short high; - unsigned long long low; -} floatx80; -#endif -#ifdef FLOAT128 -typedef struct { - unsigned long long high, low; -} float128; -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE floating-point underflow tininess-detection mode. -------------------------------------------------------------------------------- -*/ -#ifndef SOFTFLOAT_FOR_GCC -extern int8 float_detect_tininess; -#endif -enum { - float_tininess_after_rounding = 0, - float_tininess_before_rounding = 1 -}; - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE floating-point rounding mode. -------------------------------------------------------------------------------- -*/ -extern fp_rnd float_rounding_mode; -enum { - float_round_nearest_even = FP_RN, - float_round_to_zero = FP_RZ, - float_round_down = FP_RM, - float_round_up = FP_RP -}; - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE floating-point exception flags. -------------------------------------------------------------------------------- -*/ -extern fp_except float_exception_flags; -extern fp_except float_exception_mask; -enum { - float_flag_inexact = FP_X_IMP, - float_flag_underflow = FP_X_UFL, - float_flag_overflow = FP_X_OFL, - float_flag_divbyzero = FP_X_DZ, - float_flag_invalid = FP_X_INV -}; - -/* -------------------------------------------------------------------------------- -Routine to raise any or all of the software IEC/IEEE floating-point -exception flags. -------------------------------------------------------------------------------- -*/ -void float_raise( fp_except ); - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE integer-to-floating-point conversion routines. -------------------------------------------------------------------------------- -*/ -float32 int32_to_float32( int ); -float64 int32_to_float64( int ); -#ifdef FLOATX80 -floatx80 int32_to_floatx80( int ); -#endif -#ifdef FLOAT128 -float128 int32_to_float128( int ); -#endif -float32 int64_to_float32( long long ); -float64 int64_to_float64( long long ); -#ifdef FLOATX80 -floatx80 int64_to_floatx80( long long ); -#endif -#ifdef FLOAT128 -float128 int64_to_float128( long long ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE single-precision conversion routines. -------------------------------------------------------------------------------- -*/ -int float32_to_int32( float32 ); -int float32_to_int32_round_to_zero( float32 ); -unsigned int float32_to_uint32_round_to_zero( float32 ); -long long float32_to_int64( float32 ); -long long float32_to_int64_round_to_zero( float32 ); -float64 float32_to_float64( float32 ); -#ifdef FLOATX80 -floatx80 float32_to_floatx80( float32 ); -#endif -#ifdef FLOAT128 -float128 float32_to_float128( float32 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE single-precision operations. -------------------------------------------------------------------------------- -*/ -float32 float32_round_to_int( float32 ); -float32 float32_add( float32, float32 ); -float32 float32_sub( float32, float32 ); -float32 float32_mul( float32, float32 ); -float32 float32_div( float32, float32 ); -float32 float32_rem( float32, float32 ); -float32 float32_sqrt( float32 ); -flag float32_eq( float32, float32 ); -flag float32_le( float32, float32 ); -flag float32_lt( float32, float32 ); -flag float32_eq_signaling( float32, float32 ); -flag float32_le_quiet( float32, float32 ); -flag float32_lt_quiet( float32, float32 ); -#ifndef SOFTFLOAT_FOR_GCC -flag float32_is_signaling_nan( float32 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE double-precision conversion routines. -------------------------------------------------------------------------------- -*/ -int float64_to_int32( float64 ); -int float64_to_int32_round_to_zero( float64 ); -unsigned int float64_to_uint32_round_to_zero( float64 ); -long long float64_to_int64( float64 ); -long long float64_to_int64_round_to_zero( float64 ); -float32 float64_to_float32( float64 ); -#ifdef FLOATX80 -floatx80 float64_to_floatx80( float64 ); -#endif -#ifdef FLOAT128 -float128 float64_to_float128( float64 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE double-precision operations. -------------------------------------------------------------------------------- -*/ -float64 float64_round_to_int( float64 ); -float64 float64_add( float64, float64 ); -float64 float64_sub( float64, float64 ); -float64 float64_mul( float64, float64 ); -float64 float64_div( float64, float64 ); -float64 float64_rem( float64, float64 ); -float64 float64_sqrt( float64 ); -flag float64_eq( float64, float64 ); -flag float64_le( float64, float64 ); -flag float64_lt( float64, float64 ); -flag float64_eq_signaling( float64, float64 ); -flag float64_le_quiet( float64, float64 ); -flag float64_lt_quiet( float64, float64 ); -#ifndef SOFTFLOAT_FOR_GCC -flag float64_is_signaling_nan( float64 ); -#endif - -#ifdef FLOATX80 - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE extended double-precision conversion routines. -------------------------------------------------------------------------------- -*/ -int floatx80_to_int32( floatx80 ); -int floatx80_to_int32_round_to_zero( floatx80 ); -long long floatx80_to_int64( floatx80 ); -long long floatx80_to_int64_round_to_zero( floatx80 ); -float32 floatx80_to_float32( floatx80 ); -float64 floatx80_to_float64( floatx80 ); -#ifdef FLOAT128 -float128 floatx80_to_float128( floatx80 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE extended double-precision rounding precision. Valid -values are 32, 64, and 80. -------------------------------------------------------------------------------- -*/ -extern int floatx80_rounding_precision; - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE extended double-precision operations. -------------------------------------------------------------------------------- -*/ -floatx80 floatx80_round_to_int( floatx80 ); -floatx80 floatx80_add( floatx80, floatx80 ); -floatx80 floatx80_sub( floatx80, floatx80 ); -floatx80 floatx80_mul( floatx80, floatx80 ); -floatx80 floatx80_div( floatx80, floatx80 ); -floatx80 floatx80_rem( floatx80, floatx80 ); -floatx80 floatx80_sqrt( floatx80 ); -flag floatx80_eq( floatx80, floatx80 ); -flag floatx80_le( floatx80, floatx80 ); -flag floatx80_lt( floatx80, floatx80 ); -flag floatx80_eq_signaling( floatx80, floatx80 ); -flag floatx80_le_quiet( floatx80, floatx80 ); -flag floatx80_lt_quiet( floatx80, floatx80 ); -flag floatx80_is_signaling_nan( floatx80 ); - -#endif - -#ifdef FLOAT128 - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE quadruple-precision conversion routines. -------------------------------------------------------------------------------- -*/ -int float128_to_int32( float128 ); -int float128_to_int32_round_to_zero( float128 ); -long long float128_to_int64( float128 ); -long long float128_to_int64_round_to_zero( float128 ); -float32 float128_to_float32( float128 ); -float64 float128_to_float64( float128 ); -#ifdef FLOATX80 -floatx80 float128_to_floatx80( float128 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE quadruple-precision operations. -------------------------------------------------------------------------------- -*/ -float128 float128_round_to_int( float128 ); -float128 float128_add( float128, float128 ); -float128 float128_sub( float128, float128 ); -float128 float128_mul( float128, float128 ); -float128 float128_div( float128, float128 ); -float128 float128_rem( float128, float128 ); -float128 float128_sqrt( float128 ); -flag float128_eq( float128, float128 ); -flag float128_le( float128, float128 ); -flag float128_lt( float128, float128 ); -flag float128_eq_signaling( float128, float128 ); -flag float128_le_quiet( float128, float128 ); -flag float128_lt_quiet( float128, float128 ); -flag float128_is_signaling_nan( float128 ); - -#endif diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/sh3/milieu.h b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/sh3/milieu.h deleted file mode 100644 index 0a4fda4c37ac..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/sh3/milieu.h +++ /dev/null @@ -1,48 +0,0 @@ -/* NetBSD: milieu.h,v 1.1 2000/06/06 17:28:42 tsubai Exp */ - -/* -=============================================================================== - -This C header file is part of the SoftFloat IEC/IEEE Floating-point -Arithmetic Package, Release 2a. - -Written by John R. Hauser. This work was made possible in part by the -International Computer Science Institute, located at Suite 600, 1947 Center -Street, Berkeley, California 94704. Funding was partially provided by the -National Science Foundation under grant MIP-9311980. The original version -of this code was written as part of a project to build a fixed-point vector -processor in collaboration with the University of California at Berkeley, -overseen by Profs. Nelson Morgan and John Wawrzynek. More information -is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ -arithmetic/SoftFloat.html'. - -THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. - -Derivative works are acceptable, even for commercial purposes, so long as -(1) they include prominent notice that the work is derivative, and (2) they -include prominent notice akin to these four paragraphs for those parts of -this code that are retained. - -=============================================================================== -*/ - -/* -------------------------------------------------------------------------------- -Include common integer types and flags. -------------------------------------------------------------------------------- -*/ -#include "sh3-gcc.h" - -/* -------------------------------------------------------------------------------- -Symbolic Boolean literals. -------------------------------------------------------------------------------- -*/ -enum { - FALSE = 0, - TRUE = 1 -}; diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/sh3/sh3-gcc.h b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/sh3/sh3-gcc.h deleted file mode 100644 index d98fde733161..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/sh3/sh3-gcc.h +++ /dev/null @@ -1,89 +0,0 @@ -/* NetBSD: sh3-gcc.h,v 1.2 2005/12/24 21:11:16 perry Exp */ - -/* -------------------------------------------------------------------------------- -One of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined. -------------------------------------------------------------------------------- -*/ -#include -#if _BYTE_ORDER == _BIG_ENDIAN -#define BIGENDIAN -#endif -#if _BYTE_ORDER == _LITTLE_ENDIAN -#define LITTLEENDIAN -#endif - -/* -------------------------------------------------------------------------------- -The macro `BITS64' can be defined to indicate that 64-bit integer types are -supported by the compiler. -------------------------------------------------------------------------------- -*/ -#define BITS64 - -/* -------------------------------------------------------------------------------- -Each of the following `typedef's defines the most convenient type that holds -integers of at least as many bits as specified. For example, `uint8' should -be the most convenient type that can hold unsigned integers of as many as -8 bits. The `flag' type must be able to hold either a 0 or 1. For most -implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed -to the same as `int'. -------------------------------------------------------------------------------- -*/ -typedef int flag; -typedef unsigned char uint8; -typedef signed char int8; -typedef int uint16; -typedef int int16; -typedef unsigned int uint32; -typedef signed int int32; -#ifdef BITS64 -typedef unsigned long long int uint64; -typedef signed long long int int64; -#endif - -/* -------------------------------------------------------------------------------- -Each of the following `typedef's defines a type that holds integers -of _exactly_ the number of bits specified. For instance, for most -implementation of C, `bits16' and `sbits16' should be `typedef'ed to -`unsigned short int' and `signed short int' (or `short int'), respectively. -------------------------------------------------------------------------------- -*/ -typedef unsigned char bits8; -typedef signed char sbits8; -typedef unsigned short int bits16; -typedef signed short int sbits16; -typedef unsigned int bits32; -typedef signed int sbits32; -#ifdef BITS64 -typedef unsigned long long int bits64; -typedef signed long long int sbits64; -#endif - -#ifdef BITS64 -/* -------------------------------------------------------------------------------- -The `LIT64' macro takes as its argument a textual integer literal and -if necessary ``marks'' the literal as having a 64-bit integer type. -For example, the GNU C Compiler (`gcc') requires that 64-bit literals be -appended with the letters `LL' standing for `long long', which is `gcc's -name for the 64-bit integer type. Some compilers may allow `LIT64' to be -defined as the identity macro: `#define LIT64( a ) a'. -------------------------------------------------------------------------------- -*/ -#define LIT64(a) a##LL -#endif - -/* -------------------------------------------------------------------------------- -The macro `INLINE' can be used before functions that should be inlined. If -a compiler does not support explicit inlining, this macro should be defined -to be `static'. -------------------------------------------------------------------------------- -*/ -#define INLINE static inline - -#define FLOAT64_DEMANGLE(a) (a) -#define FLOAT64_MANGLE(a) (a) diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/sh3/softfloat.h b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/sh3/softfloat.h deleted file mode 100644 index 79a7ae3c0bd5..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/sh3/softfloat.h +++ /dev/null @@ -1,314 +0,0 @@ -/* NetBSD: softfloat.h,v 1.9 2006/05/16 20:55:51 mrg Exp */ - -/* This is a derivative work. */ - -/* -=============================================================================== - -This C header file is part of the SoftFloat IEC/IEEE Floating-point -Arithmetic Package, Release 2a. - -Written by John R. Hauser. This work was made possible in part by the -International Computer Science Institute, located at Suite 600, 1947 Center -Street, Berkeley, California 94704. Funding was partially provided by the -National Science Foundation under grant MIP-9311980. The original version -of this code was written as part of a project to build a fixed-point vector -processor in collaboration with the University of California at Berkeley, -overseen by Profs. Nelson Morgan and John Wawrzynek. More information -is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ -arithmetic/SoftFloat.html'. - -THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. - -Derivative works are acceptable, even for commercial purposes, so long as -(1) they include prominent notice that the work is derivative, and (2) they -include prominent notice akin to these four paragraphs for those parts of -this code that are retained. - -=============================================================================== -*/ - -/* -------------------------------------------------------------------------------- -The macro `FLOATX80' must be defined to enable the extended double-precision -floating-point format `floatx80'. If this macro is not defined, the -`floatx80' type will not be defined, and none of the functions that either -input or output the `floatx80' type will be defined. The same applies to -the `FLOAT128' macro and the quadruple-precision format `float128'. -------------------------------------------------------------------------------- -*/ -/* #define FLOATX80 */ -/* #define FLOAT128 */ - -#include - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE floating-point types. -------------------------------------------------------------------------------- -*/ -typedef unsigned int float32; -typedef unsigned long long float64; -#ifdef FLOATX80 -typedef struct { - unsigned short high; - unsigned long long low; -} floatx80; -#endif -#ifdef FLOAT128 -typedef struct { - unsigned long long high, low; -} float128; -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE floating-point underflow tininess-detection mode. -------------------------------------------------------------------------------- -*/ -#ifndef SOFTFLOAT_FOR_GCC -extern int8 float_detect_tininess; -#endif -enum { - float_tininess_after_rounding = 0, - float_tininess_before_rounding = 1 -}; - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE floating-point rounding mode. -------------------------------------------------------------------------------- -*/ -extern fp_rnd float_rounding_mode; -enum { - float_round_nearest_even = FP_RN, - float_round_to_zero = FP_RZ, - float_round_down = FP_RM, - float_round_up = FP_RP -}; - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE floating-point exception flags. -------------------------------------------------------------------------------- -*/ -extern fp_except float_exception_flags; -extern fp_except float_exception_mask; -enum { - float_flag_inexact = FP_X_IMP, - float_flag_underflow = FP_X_UFL, - float_flag_overflow = FP_X_OFL, - float_flag_divbyzero = FP_X_DZ, - float_flag_invalid = FP_X_INV -}; - -/* -------------------------------------------------------------------------------- -Routine to raise any or all of the software IEC/IEEE floating-point -exception flags. -------------------------------------------------------------------------------- -*/ -void float_raise( fp_except ); - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE integer-to-floating-point conversion routines. -------------------------------------------------------------------------------- -*/ -float32 int32_to_float32( int ); -float64 int32_to_float64( int ); -#ifdef FLOATX80 -floatx80 int32_to_floatx80( int ); -#endif -#ifdef FLOAT128 -float128 int32_to_float128( int ); -#endif -#ifndef SOFTFLOAT_FOR_GCC /* __floatdi?f is in libgcc2.c */ -float32 int64_to_float32( long long ); -float64 int64_to_float64( long long ); -#ifdef FLOATX80 -floatx80 int64_to_floatx80( long long ); -#endif -#ifdef FLOAT128 -float128 int64_to_float128( long long ); -#endif -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE single-precision conversion routines. -------------------------------------------------------------------------------- -*/ -int float32_to_int32( float32 ); -int float32_to_int32_round_to_zero( float32 ); -#if defined(SOFTFLOAT_FOR_GCC) && defined(SOFTFLOAT_NEED_FIXUNS) -unsigned int float32_to_uint32_round_to_zero( float32 ); -#endif -#ifndef SOFTFLOAT_FOR_GCC /* __fix?fdi provided by libgcc2.c */ -long long float32_to_int64( float32 ); -long long float32_to_int64_round_to_zero( float32 ); -#endif -float64 float32_to_float64( float32 ); -#ifdef FLOATX80 -floatx80 float32_to_floatx80( float32 ); -#endif -#ifdef FLOAT128 -float128 float32_to_float128( float32 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE single-precision operations. -------------------------------------------------------------------------------- -*/ -float32 float32_round_to_int( float32 ); -float32 float32_add( float32, float32 ); -float32 float32_sub( float32, float32 ); -float32 float32_mul( float32, float32 ); -float32 float32_div( float32, float32 ); -float32 float32_rem( float32, float32 ); -float32 float32_sqrt( float32 ); -flag float32_eq( float32, float32 ); -flag float32_le( float32, float32 ); -flag float32_lt( float32, float32 ); -flag float32_eq_signaling( float32, float32 ); -flag float32_le_quiet( float32, float32 ); -flag float32_lt_quiet( float32, float32 ); -#ifndef SOFTFLOAT_FOR_GCC -flag float32_is_signaling_nan( float32 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE double-precision conversion routines. -------------------------------------------------------------------------------- -*/ -int float64_to_int32( float64 ); -int float64_to_int32_round_to_zero( float64 ); -#if defined(SOFTFLOAT_FOR_GCC) && defined(SOFTFLOAT_NEED_FIXUNS) -unsigned int float64_to_uint32_round_to_zero( float64 ); -#endif -#ifndef SOFTFLOAT_FOR_GCC /* __fix?fdi provided by libgcc2.c */ -long long float64_to_int64( float64 ); -long long float64_to_int64_round_to_zero( float64 ); -#endif -float32 float64_to_float32( float64 ); -#ifdef FLOATX80 -floatx80 float64_to_floatx80( float64 ); -#endif -#ifdef FLOAT128 -float128 float64_to_float128( float64 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE double-precision operations. -------------------------------------------------------------------------------- -*/ -float64 float64_round_to_int( float64 ); -float64 float64_add( float64, float64 ); -float64 float64_sub( float64, float64 ); -float64 float64_mul( float64, float64 ); -float64 float64_div( float64, float64 ); -float64 float64_rem( float64, float64 ); -float64 float64_sqrt( float64 ); -flag float64_eq( float64, float64 ); -flag float64_le( float64, float64 ); -flag float64_lt( float64, float64 ); -flag float64_eq_signaling( float64, float64 ); -flag float64_le_quiet( float64, float64 ); -flag float64_lt_quiet( float64, float64 ); -#ifndef SOFTFLOAT_FOR_GCC -flag float64_is_signaling_nan( float64 ); -#endif - -#ifdef FLOATX80 - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE extended double-precision conversion routines. -------------------------------------------------------------------------------- -*/ -int floatx80_to_int32( floatx80 ); -int floatx80_to_int32_round_to_zero( floatx80 ); -long long floatx80_to_int64( floatx80 ); -long long floatx80_to_int64_round_to_zero( floatx80 ); -float32 floatx80_to_float32( floatx80 ); -float64 floatx80_to_float64( floatx80 ); -#ifdef FLOAT128 -float128 floatx80_to_float128( floatx80 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE extended double-precision rounding precision. Valid -values are 32, 64, and 80. -------------------------------------------------------------------------------- -*/ -extern int floatx80_rounding_precision; - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE extended double-precision operations. -------------------------------------------------------------------------------- -*/ -floatx80 floatx80_round_to_int( floatx80 ); -floatx80 floatx80_add( floatx80, floatx80 ); -floatx80 floatx80_sub( floatx80, floatx80 ); -floatx80 floatx80_mul( floatx80, floatx80 ); -floatx80 floatx80_div( floatx80, floatx80 ); -floatx80 floatx80_rem( floatx80, floatx80 ); -floatx80 floatx80_sqrt( floatx80 ); -flag floatx80_eq( floatx80, floatx80 ); -flag floatx80_le( floatx80, floatx80 ); -flag floatx80_lt( floatx80, floatx80 ); -flag floatx80_eq_signaling( floatx80, floatx80 ); -flag floatx80_le_quiet( floatx80, floatx80 ); -flag floatx80_lt_quiet( floatx80, floatx80 ); -flag floatx80_is_signaling_nan( floatx80 ); - -#endif - -#ifdef FLOAT128 - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE quadruple-precision conversion routines. -------------------------------------------------------------------------------- -*/ -int float128_to_int32( float128 ); -int float128_to_int32_round_to_zero( float128 ); -long long float128_to_int64( float128 ); -long long float128_to_int64_round_to_zero( float128 ); -float32 float128_to_float32( float128 ); -float64 float128_to_float64( float128 ); -#ifdef FLOATX80 -floatx80 float128_to_floatx80( float128 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE quadruple-precision operations. -------------------------------------------------------------------------------- -*/ -float128 float128_round_to_int( float128 ); -float128 float128_add( float128, float128 ); -float128 float128_sub( float128, float128 ); -float128 float128_mul( float128, float128 ); -float128 float128_div( float128, float128 ); -float128 float128_rem( float128, float128 ); -float128 float128_sqrt( float128 ); -flag float128_eq( float128, float128 ); -flag float128_le( float128, float128 ); -flag float128_lt( float128, float128 ); -flag float128_eq_signaling( float128, float128 ); -flag float128_le_quiet( float128, float128 ); -flag float128_lt_quiet( float128, float128 ); -flag float128_is_signaling_nan( float128 ); - -#endif - diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/sparc64/ieeefp.h b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/sparc64/ieeefp.h deleted file mode 100644 index 1b68b2973bc8..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/sparc64/ieeefp.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Written by J.T. Conklin, Apr 6, 1995 - * Public domain. - */ - -#ifndef _SPARC_IEEEFP_H_ -#define _SPARC_IEEEFP_H_ - -typedef int fp_except; -#define FP_X_IMP 0x01 /* imprecise (loss of precision) */ -#define FP_X_DZ 0x02 /* divide-by-zero exception */ -#define FP_X_UFL 0x04 /* underflow exception */ -#define FP_X_OFL 0x08 /* overflow exception */ -#define FP_X_INV 0x10 /* invalid operation exception */ - -typedef enum { - FP_RN=0, /* round to nearest representable number */ - FP_RZ=1, /* round to zero (truncate) */ - FP_RP=2, /* round toward positive infinity */ - FP_RM=3 /* round toward negative infinity */ -} fp_rnd; - -#endif /* _SPARC_IEEEFP_H_ */ diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/sparc64/milieu.h b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/sparc64/milieu.h deleted file mode 100644 index 5c0e6a0d7d72..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/sparc64/milieu.h +++ /dev/null @@ -1,48 +0,0 @@ -/* NetBSD: milieu.h,v 1.1 2002/02/05 07:53:05 jmc Exp */ - -/* -=============================================================================== - -This C header file is part of the SoftFloat IEC/IEEE Floating-point -Arithmetic Package, Release 2a. - -Written by John R. Hauser. This work was made possible in part by the -International Computer Science Institute, located at Suite 600, 1947 Center -Street, Berkeley, California 94704. Funding was partially provided by the -National Science Foundation under grant MIP-9311980. The original version -of this code was written as part of a project to build a fixed-point vector -processor in collaboration with the University of California at Berkeley, -overseen by Profs. Nelson Morgan and John Wawrzynek. More information -is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ -arithmetic/SoftFloat.html'. - -THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. - -Derivative works are acceptable, even for commercial purposes, so long as -(1) they include prominent notice that the work is derivative, and (2) they -include prominent notice akin to these four paragraphs for those parts of -this code that are retained. - -=============================================================================== -*/ - -/* -------------------------------------------------------------------------------- -Include common integer types and flags. -------------------------------------------------------------------------------- -*/ -#include "sparc64-gcc.h" - -/* -------------------------------------------------------------------------------- -Symbolic Boolean literals. -------------------------------------------------------------------------------- -*/ -enum { - FALSE = 0, - TRUE = 1 -}; diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/sparc64/softfloat-qp.h b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/sparc64/softfloat-qp.h deleted file mode 100644 index 1fda8802cfda..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/sparc64/softfloat-qp.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Get everything SOFTFLOAT_FOR_GCC normally would rename out of the users - * namespace. Much of this isn't used but to avoid dissecting softloat.c - * all of it is pulled in even for just the _Qp* case - */ - -#if defined(SOFTFLOATSPARC64_FOR_GCC) && !defined(SOFTFLOAT_FOR_GCC) -#define float_exception_flags _softfloat_float_exception_flags -#define float_rounding_mode _softfloat_float_rounding_mode -#define float_raise _softfloat_float_raise - -#define float32_eq _softfloat_float32_eq -#define float32_le _softfloat_float32_le -#define float32_lt _softfloat_float32_lt -#define float64_eq _softfloat_float64_eq -#define float64_le _softfloat_float64_le -#define float64_lt _softfloat_float64_lt - -#define float32_add _softfloat_float32_add -#define float64_add _softfloat_float64_add -#define float32_sub _softfloat_float32_sub -#define float64_sub _softfloat_float64_sub -#define float32_mul _softfloat_float32_mul -#define float64_mul _softfloat_float64_mul -#define float32_div _softfloat_float32_div -#define float64_div _softfloat_float64_div -#define int32_to_float32 _softfloat_int32_to_float32 -#define int32_to_float64 _softfloat_int32_to_float64 -#define int64_to_float32 _softfloat_int64_to_float32 -#define int64_to_float64 _softfloat_int64_to_float64 -#define float32_to_int32_round_to_zero _softfloat_float32_to_int32_round_to_zero -#define float64_to_int32_round_to_zero _softfloat_float64_to_int32_round_to_zero -#define float32_to_int64_round_to_zero _softfloat_float32_to_int64_round_to_zero -#define float64_to_int64_round_to_zero _softfloat_float64_to_int64_round_to_zero -#define float32_to_uint32_round_to_zero _softfloat_float32_to_uint32_round_to_zero -#define float64_to_uint32_round_to_zero _softfloat_float64_to_uint32_round_to_zero -#define float32_to_float64 _softfloat_float32_to_float64 -#define float64_to_float32 _softfloat_float64_to_float32 -#define float32_is_signaling_nan _softfloat_float32_is_signaling_nan -#define float64_is_signaling_nan _softfloat_float64_is_signaling_nan - -#endif /* SOFTFLOATSPARC64_FOR_GCC and !SOFTFLOAT_FOR_GCC */ - -/* - * The following will always end up in the namespace if FLOAT128 is - * defined and SOFTFLOAT_FOR_GCC isn't. So rename them out of the user's - * namespace. - */ - -#ifdef SOFTFLOATSPARC64_FOR_GCC -#define float128_add _softfloat_float128_add -#define float128_div _softfloat_float128_div -#define float128_eq _softfloat_float128_eq -#define float128_eq_signaling _softfloat_float128_eq_signaling -#define float128_is_nan _softfloat_float128_is_nan -#define float128_is_signaling_nan _softfloat_float128_is_signaling_nan -#define float128_le _softfloat_float128_le -#define float128_le_quiet _softfloat_float128_le_quiet -#define float128_lt _softfloat_float128_lt -#define float128_lt_quiet _softfloat_float128_lt_quiet -#define float128_mul _softfloat_float128_mul -#define float128_rem _softfloat_float128_rem -#define float128_round_to_int _softfloat_float128_round_to_int -#define float128_sqrt _softfloat_float128_sqrt -#define float128_sub _softfloat_float128_sub -#define float128_to_float32 _softfloat_float128_to_float32 -#define float128_to_float64 _softfloat_float128_to_float64 -#define float128_to_int32 _softfloat_float128_to_int32 -#define float128_to_int32_round_to_zero _softfloat_float128_to_int32_round_to_zero -#define float128_to_int64 _softfloat_float128_to_int64 -#define float128_to_int64_round_to_zero _softfloat_float128_to_int64_round_to_zero -#define float128_to_uint64_round_to_zero _softfloat_float128_to_uint64_round_to_zero -#define float32_to_float128 _softfloat_float32_to_float128 -#define float64_to_float128 _softfloat_float64_to_float128 -#define int32_to_float128 _softfloat_int32_to_float128 -#define int64_to_float128 _softfloat_int64_to_float128 - -/* - * If this isn't defined go ahead and set it now since this is now past - * anywhere define's are happening and this will conditionally compile out - * a lot of extraneous code in softfloat.c - */ - -#ifndef SOFTFLOAT_FOR_GCC -#define SOFTFLOAT_FOR_GCC -#endif - -#endif /* SOFTFLOATSPARC64_FOR_GCC */ diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/sparc64/softfloat.h b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/sparc64/softfloat.h deleted file mode 100644 index 40c00db45b65..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/sparc64/softfloat.h +++ /dev/null @@ -1,303 +0,0 @@ -/* NetBSD: softfloat.h,v 1.6 2007/11/08 15:50:23 martin Exp */ - -/* This is a derivative work. */ - -/* -=============================================================================== - -This C header file is part of the SoftFloat IEC/IEEE Floating-point -Arithmetic Package, Release 2a. - -Written by John R. Hauser. This work was made possible in part by the -International Computer Science Institute, located at Suite 600, 1947 Center -Street, Berkeley, California 94704. Funding was partially provided by the -National Science Foundation under grant MIP-9311980. The original version -of this code was written as part of a project to build a fixed-point vector -processor in collaboration with the University of California at Berkeley, -overseen by Profs. Nelson Morgan and John Wawrzynek. More information -is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ -arithmetic/SoftFloat.html'. - -THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. - -Derivative works are acceptable, even for commercial purposes, so long as -(1) they include prominent notice that the work is derivative, and (2) they -include prominent notice akin to these four paragraphs for those parts of -this code that are retained. - -=============================================================================== -*/ - -/* -------------------------------------------------------------------------------- -The macro `FLOATX80' must be defined to enable the extended double-precision -floating-point format `floatx80'. If this macro is not defined, the -`floatx80' type will not be defined, and none of the functions that either -input or output the `floatx80' type will be defined. The same applies to -the `FLOAT128' macro and the quadruple-precision format `float128'. -------------------------------------------------------------------------------- -*/ -/* #define FLOATX80 */ -#define FLOAT128 - -#include "softfloat-qp.h" - -#include "ieeefp.h" - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE floating-point types. -------------------------------------------------------------------------------- -*/ -typedef unsigned int float32; -typedef unsigned long long float64; -#ifdef FLOATX80 -typedef struct { - unsigned short high; - unsigned long long low; -} floatx80; -#endif -#ifdef FLOAT128 -typedef struct { - unsigned long long high, low; -} float128; -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE floating-point underflow tininess-detection mode. -------------------------------------------------------------------------------- -*/ -#ifndef SOFTFLOAT_FOR_GCC -extern int8 float_detect_tininess; -#endif -enum { - float_tininess_after_rounding = 0, - float_tininess_before_rounding = 1 -}; - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE floating-point rounding mode. -------------------------------------------------------------------------------- -*/ -extern fp_rnd float_rounding_mode; -enum { - float_round_nearest_even = FP_RN, - float_round_to_zero = FP_RZ, - float_round_down = FP_RM, - float_round_up = FP_RP -}; - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE floating-point exception flags. -------------------------------------------------------------------------------- -*/ -extern fp_except float_exception_flags; -extern fp_except float_exception_mask; -enum { - float_flag_inexact = FP_X_IMP, - float_flag_underflow = FP_X_UFL, - float_flag_overflow = FP_X_OFL, - float_flag_divbyzero = FP_X_DZ, - float_flag_invalid = FP_X_INV -}; - -/* -------------------------------------------------------------------------------- -Routine to raise any or all of the software IEC/IEEE floating-point -exception flags. -------------------------------------------------------------------------------- -*/ -void float_raise( fp_except ); - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE integer-to-floating-point conversion routines. -------------------------------------------------------------------------------- -*/ -float32 int32_to_float32( int ); -float64 int32_to_float64( int ); -#ifdef FLOATX80 -floatx80 int32_to_floatx80( int ); -#endif -#ifdef FLOAT128 -float128 int32_to_float128( int ); -#endif -float32 int64_to_float32( long long ); -float64 int64_to_float64( long long ); -#ifdef FLOATX80 -floatx80 int64_to_floatx80( long long ); -#endif -#ifdef FLOAT128 -float128 int64_to_float128( long long ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE single-precision conversion routines. -------------------------------------------------------------------------------- -*/ -int float32_to_int32( float32 ); -int float32_to_int32_round_to_zero( float32 ); -unsigned int float32_to_uint32_round_to_zero( float32 ); -long long float32_to_int64( float32 ); -long long float32_to_int64_round_to_zero( float32 ); -float64 float32_to_float64( float32 ); -#ifdef FLOATX80 -floatx80 float32_to_floatx80( float32 ); -#endif -#ifdef FLOAT128 -float128 float32_to_float128( float32 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE single-precision operations. -------------------------------------------------------------------------------- -*/ -float32 float32_round_to_int( float32 ); -float32 float32_add( float32, float32 ); -float32 float32_sub( float32, float32 ); -float32 float32_mul( float32, float32 ); -float32 float32_div( float32, float32 ); -float32 float32_rem( float32, float32 ); -float32 float32_sqrt( float32 ); -flag float32_eq( float32, float32 ); -flag float32_le( float32, float32 ); -flag float32_lt( float32, float32 ); -flag float32_eq_signaling( float32, float32 ); -flag float32_le_quiet( float32, float32 ); -flag float32_lt_quiet( float32, float32 ); -flag float32_is_signaling_nan( float32 ); - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE double-precision conversion routines. -------------------------------------------------------------------------------- -*/ -int float64_to_int32( float64 ); -int float64_to_int32_round_to_zero( float64 ); -unsigned int float64_to_uint32_round_to_zero( float64 ); -long long float64_to_int64( float64 ); -long long float64_to_int64_round_to_zero( float64 ); -float32 float64_to_float32( float64 ); -#ifdef FLOATX80 -floatx80 float64_to_floatx80( float64 ); -#endif -#ifdef FLOAT128 -float128 float64_to_float128( float64 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE double-precision operations. -------------------------------------------------------------------------------- -*/ -float64 float64_round_to_int( float64 ); -float64 float64_add( float64, float64 ); -float64 float64_sub( float64, float64 ); -float64 float64_mul( float64, float64 ); -float64 float64_div( float64, float64 ); -float64 float64_rem( float64, float64 ); -float64 float64_sqrt( float64 ); -flag float64_eq( float64, float64 ); -flag float64_le( float64, float64 ); -flag float64_lt( float64, float64 ); -flag float64_eq_signaling( float64, float64 ); -flag float64_le_quiet( float64, float64 ); -flag float64_lt_quiet( float64, float64 ); -flag float64_is_signaling_nan( float64 ); - -#ifdef FLOATX80 - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE extended double-precision conversion routines. -------------------------------------------------------------------------------- -*/ -int floatx80_to_int32( floatx80 ); -int floatx80_to_int32_round_to_zero( floatx80 ); -long long floatx80_to_int64( floatx80 ); -long long floatx80_to_int64_round_to_zero( floatx80 ); -float32 floatx80_to_float32( floatx80 ); -float64 floatx80_to_float64( floatx80 ); -#ifdef FLOAT128 -float128 floatx80_to_float128( floatx80 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE extended double-precision rounding precision. Valid -values are 32, 64, and 80. -------------------------------------------------------------------------------- -*/ -extern int floatx80_rounding_precision; - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE extended double-precision operations. -------------------------------------------------------------------------------- -*/ -floatx80 floatx80_round_to_int( floatx80 ); -floatx80 floatx80_add( floatx80, floatx80 ); -floatx80 floatx80_sub( floatx80, floatx80 ); -floatx80 floatx80_mul( floatx80, floatx80 ); -floatx80 floatx80_div( floatx80, floatx80 ); -floatx80 floatx80_rem( floatx80, floatx80 ); -floatx80 floatx80_sqrt( floatx80 ); -flag floatx80_eq( floatx80, floatx80 ); -flag floatx80_le( floatx80, floatx80 ); -flag floatx80_lt( floatx80, floatx80 ); -flag floatx80_eq_signaling( floatx80, floatx80 ); -flag floatx80_le_quiet( floatx80, floatx80 ); -flag floatx80_lt_quiet( floatx80, floatx80 ); -flag floatx80_is_signaling_nan( floatx80 ); - -#endif - -#ifdef FLOAT128 - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE quadruple-precision conversion routines. -------------------------------------------------------------------------------- -*/ -int float128_to_int32( float128 ); -int float128_to_int32_round_to_zero( float128 ); -long long float128_to_int64( float128 ); -long long float128_to_int64_round_to_zero( float128 ); -unsigned long long float128_to_uint64_round_to_zero( float128 ); -float32 float128_to_float32( float128 ); -float64 float128_to_float64( float128 ); -#ifdef FLOATX80 -floatx80 float128_to_floatx80( float128 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE quadruple-precision operations. -------------------------------------------------------------------------------- -*/ -float128 float128_round_to_int( float128 ); -float128 float128_add( float128, float128 ); -float128 float128_sub( float128, float128 ); -float128 float128_mul( float128, float128 ); -float128 float128_div( float128, float128 ); -float128 float128_rem( float128, float128 ); -float128 float128_sqrt( float128 ); -flag float128_eq( float128, float128 ); -flag float128_le( float128, float128 ); -flag float128_lt( float128, float128 ); -flag float128_eq_signaling( float128, float128 ); -flag float128_le_quiet( float128, float128 ); -flag float128_lt_quiet( float128, float128 ); -flag float128_is_signaling_nan( float128 ); -flag float128_is_nan( float128 ); - -#endif diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/sparc64/sparc64-gcc.h b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/sparc64/sparc64-gcc.h deleted file mode 100644 index 4c404b3d38d5..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/arch/sparc64/sparc64-gcc.h +++ /dev/null @@ -1,89 +0,0 @@ -/* NetBSD: sparc64-gcc.h,v 1.2 2005/12/24 21:11:16 perry Exp */ - -/* -------------------------------------------------------------------------------- -One of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined. -------------------------------------------------------------------------------- -*/ -#include -#if _BYTE_ORDER == _BIG_ENDIAN -#define BIGENDIAN -#endif -#if _BYTE_ORDER == _LITTLE_ENDIAN -#define LITTLEENDIAN -#endif - -/* -------------------------------------------------------------------------------- -The macro `BITS64' can be defined to indicate that 64-bit integer types are -supported by the compiler. -------------------------------------------------------------------------------- -*/ -#define BITS64 - -/* -------------------------------------------------------------------------------- -Each of the following `typedef's defines the most convenient type that holds -integers of at least as many bits as specified. For example, `uint8' should -be the most convenient type that can hold unsigned integers of as many as -8 bits. The `flag' type must be able to hold either a 0 or 1. For most -implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed -to the same as `int'. -------------------------------------------------------------------------------- -*/ -typedef int flag; -typedef int uint8; -typedef int int8; -typedef int uint16; -typedef int int16; -typedef unsigned int uint32; -typedef signed int int32; -#ifdef BITS64 -typedef unsigned long long int uint64; -typedef signed long long int int64; -#endif - -/* -------------------------------------------------------------------------------- -Each of the following `typedef's defines a type that holds integers -of _exactly_ the number of bits specified. For instance, for most -implementation of C, `bits16' and `sbits16' should be `typedef'ed to -`unsigned short int' and `signed short int' (or `short int'), respectively. -------------------------------------------------------------------------------- -*/ -typedef unsigned char bits8; -typedef signed char sbits8; -typedef unsigned short int bits16; -typedef signed short int sbits16; -typedef unsigned int bits32; -typedef signed int sbits32; -#ifdef BITS64 -typedef unsigned long long int bits64; -typedef signed long long int sbits64; -#endif - -#ifdef BITS64 -/* -------------------------------------------------------------------------------- -The `LIT64' macro takes as its argument a textual integer literal and -if necessary ``marks'' the literal as having a 64-bit integer type. -For example, the GNU C Compiler (`gcc') requires that 64-bit literals be -appended with the letters `LL' standing for `long long', which is `gcc's -name for the 64-bit integer type. Some compilers may allow `LIT64' to be -defined as the identity macro: `#define LIT64( a ) a'. -------------------------------------------------------------------------------- -*/ -#define LIT64( a ) a##LL -#endif - -/* -------------------------------------------------------------------------------- -The macro `INLINE' can be used before functions that should be inlined. If -a compiler does not support explicit inlining, this macro should be defined -to be `static'. -------------------------------------------------------------------------------- -*/ -#define INLINE static inline - -#define FLOAT64_DEMANGLE(a) (a) -#define FLOAT64_MANGLE(a) (a) diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/bits32/softfloat-macros b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/bits32/softfloat-macros deleted file mode 100644 index d629e3e5dee8..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/bits32/softfloat-macros +++ /dev/null @@ -1,648 +0,0 @@ - -/* -=============================================================================== - -This C source fragment is part of the SoftFloat IEC/IEEE Floating-point -Arithmetic Package, Release 2a. - -Written by John R. Hauser. This work was made possible in part by the -International Computer Science Institute, located at Suite 600, 1947 Center -Street, Berkeley, California 94704. Funding was partially provided by the -National Science Foundation under grant MIP-9311980. The original version -of this code was written as part of a project to build a fixed-point vector -processor in collaboration with the University of California at Berkeley, -overseen by Profs. Nelson Morgan and John Wawrzynek. More information -is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ -arithmetic/SoftFloat.html'. - -THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. - -Derivative works are acceptable, even for commercial purposes, so long as -(1) they include prominent notice that the work is derivative, and (2) they -include prominent notice akin to these four paragraphs for those parts of -this code that are retained. - -=============================================================================== -*/ - -/* -------------------------------------------------------------------------------- -Shifts `a' right by the number of bits given in `count'. If any nonzero -bits are shifted off, they are ``jammed'' into the least significant bit of -the result by setting the least significant bit to 1. The value of `count' -can be arbitrarily large; in particular, if `count' is greater than 32, the -result will be either 0 or 1, depending on whether `a' is zero or nonzero. -The result is stored in the location pointed to by `zPtr'. -------------------------------------------------------------------------------- -*/ -INLINE void shift32RightJamming( bits32 a, int16 count, bits32 *zPtr ) -{ - bits32 z; - - if ( count == 0 ) { - z = a; - } - else if ( count < 32 ) { - z = ( a>>count ) | ( ( a<<( ( - count ) & 31 ) ) != 0 ); - } - else { - z = ( a != 0 ); - } - *zPtr = z; - -} - -/* -------------------------------------------------------------------------------- -Shifts the 64-bit value formed by concatenating `a0' and `a1' right by the -number of bits given in `count'. Any bits shifted off are lost. The value -of `count' can be arbitrarily large; in particular, if `count' is greater -than 64, the result will be 0. The result is broken into two 32-bit pieces -which are stored at the locations pointed to by `z0Ptr' and `z1Ptr'. -------------------------------------------------------------------------------- -*/ -INLINE void - shift64Right( - bits32 a0, bits32 a1, int16 count, bits32 *z0Ptr, bits32 *z1Ptr ) -{ - bits32 z0, z1; - int8 negCount = ( - count ) & 31; - - if ( count == 0 ) { - z1 = a1; - z0 = a0; - } - else if ( count < 32 ) { - z1 = ( a0<>count ); - z0 = a0>>count; - } - else { - z1 = ( count < 64 ) ? ( a0>>( count & 31 ) ) : 0; - z0 = 0; - } - *z1Ptr = z1; - *z0Ptr = z0; - -} - -/* -------------------------------------------------------------------------------- -Shifts the 64-bit value formed by concatenating `a0' and `a1' right by the -number of bits given in `count'. If any nonzero bits are shifted off, they -are ``jammed'' into the least significant bit of the result by setting the -least significant bit to 1. The value of `count' can be arbitrarily large; -in particular, if `count' is greater than 64, the result will be either 0 -or 1, depending on whether the concatenation of `a0' and `a1' is zero or -nonzero. The result is broken into two 32-bit pieces which are stored at -the locations pointed to by `z0Ptr' and `z1Ptr'. -------------------------------------------------------------------------------- -*/ -INLINE void - shift64RightJamming( - bits32 a0, bits32 a1, int16 count, bits32 *z0Ptr, bits32 *z1Ptr ) -{ - bits32 z0, z1; - int8 negCount = ( - count ) & 31; - - if ( count == 0 ) { - z1 = a1; - z0 = a0; - } - else if ( count < 32 ) { - z1 = ( a0<>count ) | ( ( a1<>count; - } - else { - if ( count == 32 ) { - z1 = a0 | ( a1 != 0 ); - } - else if ( count < 64 ) { - z1 = ( a0>>( count & 31 ) ) | ( ( ( a0<>count ); - z0 = a0>>count; - } - else { - if ( count == 32 ) { - z2 = a1; - z1 = a0; - } - else { - a2 |= a1; - if ( count < 64 ) { - z2 = a0<>( count & 31 ); - } - else { - z2 = ( count == 64 ) ? a0 : ( a0 != 0 ); - z1 = 0; - } - } - z0 = 0; - } - z2 |= ( a2 != 0 ); - } - *z2Ptr = z2; - *z1Ptr = z1; - *z0Ptr = z0; - -} - -/* -------------------------------------------------------------------------------- -Shifts the 64-bit value formed by concatenating `a0' and `a1' left by the -number of bits given in `count'. Any bits shifted off are lost. The value -of `count' must be less than 32. The result is broken into two 32-bit -pieces which are stored at the locations pointed to by `z0Ptr' and `z1Ptr'. -------------------------------------------------------------------------------- -*/ -INLINE void - shortShift64Left( - bits32 a0, bits32 a1, int16 count, bits32 *z0Ptr, bits32 *z1Ptr ) -{ - - *z1Ptr = a1<>( ( - count ) & 31 ) ); - -} - -/* -------------------------------------------------------------------------------- -Shifts the 96-bit value formed by concatenating `a0', `a1', and `a2' left -by the number of bits given in `count'. Any bits shifted off are lost. -The value of `count' must be less than 32. The result is broken into three -32-bit pieces which are stored at the locations pointed to by `z0Ptr', -`z1Ptr', and `z2Ptr'. -------------------------------------------------------------------------------- -*/ -INLINE void - shortShift96Left( - bits32 a0, - bits32 a1, - bits32 a2, - int16 count, - bits32 *z0Ptr, - bits32 *z1Ptr, - bits32 *z2Ptr - ) -{ - bits32 z0, z1, z2; - int8 negCount; - - z2 = a2<>negCount; - z0 |= a1>>negCount; - } - *z2Ptr = z2; - *z1Ptr = z1; - *z0Ptr = z0; - -} - -/* -------------------------------------------------------------------------------- -Adds the 64-bit value formed by concatenating `a0' and `a1' to the 64-bit -value formed by concatenating `b0' and `b1'. Addition is modulo 2^64, so -any carry out is lost. The result is broken into two 32-bit pieces which -are stored at the locations pointed to by `z0Ptr' and `z1Ptr'. -------------------------------------------------------------------------------- -*/ -INLINE void - add64( - bits32 a0, bits32 a1, bits32 b0, bits32 b1, bits32 *z0Ptr, bits32 *z1Ptr ) -{ - bits32 z1; - - z1 = a1 + b1; - *z1Ptr = z1; - *z0Ptr = a0 + b0 + ( z1 < a1 ); - -} - -/* -------------------------------------------------------------------------------- -Adds the 96-bit value formed by concatenating `a0', `a1', and `a2' to the -96-bit value formed by concatenating `b0', `b1', and `b2'. Addition is -modulo 2^96, so any carry out is lost. The result is broken into three -32-bit pieces which are stored at the locations pointed to by `z0Ptr', -`z1Ptr', and `z2Ptr'. -------------------------------------------------------------------------------- -*/ -INLINE void - add96( - bits32 a0, - bits32 a1, - bits32 a2, - bits32 b0, - bits32 b1, - bits32 b2, - bits32 *z0Ptr, - bits32 *z1Ptr, - bits32 *z2Ptr - ) -{ - bits32 z0, z1, z2; - int8 carry0, carry1; - - z2 = a2 + b2; - carry1 = ( z2 < a2 ); - z1 = a1 + b1; - carry0 = ( z1 < a1 ); - z0 = a0 + b0; - z1 += carry1; - z0 += ( z1 < carry1 ); - z0 += carry0; - *z2Ptr = z2; - *z1Ptr = z1; - *z0Ptr = z0; - -} - -/* -------------------------------------------------------------------------------- -Subtracts the 64-bit value formed by concatenating `b0' and `b1' from the -64-bit value formed by concatenating `a0' and `a1'. Subtraction is modulo -2^64, so any borrow out (carry out) is lost. The result is broken into two -32-bit pieces which are stored at the locations pointed to by `z0Ptr' and -`z1Ptr'. -------------------------------------------------------------------------------- -*/ -INLINE void - sub64( - bits32 a0, bits32 a1, bits32 b0, bits32 b1, bits32 *z0Ptr, bits32 *z1Ptr ) -{ - - *z1Ptr = a1 - b1; - *z0Ptr = a0 - b0 - ( a1 < b1 ); - -} - -/* -------------------------------------------------------------------------------- -Subtracts the 96-bit value formed by concatenating `b0', `b1', and `b2' from -the 96-bit value formed by concatenating `a0', `a1', and `a2'. Subtraction -is modulo 2^96, so any borrow out (carry out) is lost. The result is broken -into three 32-bit pieces which are stored at the locations pointed to by -`z0Ptr', `z1Ptr', and `z2Ptr'. -------------------------------------------------------------------------------- -*/ -INLINE void - sub96( - bits32 a0, - bits32 a1, - bits32 a2, - bits32 b0, - bits32 b1, - bits32 b2, - bits32 *z0Ptr, - bits32 *z1Ptr, - bits32 *z2Ptr - ) -{ - bits32 z0, z1, z2; - int8 borrow0, borrow1; - - z2 = a2 - b2; - borrow1 = ( a2 < b2 ); - z1 = a1 - b1; - borrow0 = ( a1 < b1 ); - z0 = a0 - b0; - z0 -= ( z1 < borrow1 ); - z1 -= borrow1; - z0 -= borrow0; - *z2Ptr = z2; - *z1Ptr = z1; - *z0Ptr = z0; - -} - -/* -------------------------------------------------------------------------------- -Multiplies `a' by `b' to obtain a 64-bit product. The product is broken -into two 32-bit pieces which are stored at the locations pointed to by -`z0Ptr' and `z1Ptr'. -------------------------------------------------------------------------------- -*/ -INLINE void mul32To64( bits32 a, bits32 b, bits32 *z0Ptr, bits32 *z1Ptr ) -{ - bits16 aHigh, aLow, bHigh, bLow; - bits32 z0, zMiddleA, zMiddleB, z1; - - aLow = a; - aHigh = a>>16; - bLow = b; - bHigh = b>>16; - z1 = ( (bits32) aLow ) * bLow; - zMiddleA = ( (bits32) aLow ) * bHigh; - zMiddleB = ( (bits32) aHigh ) * bLow; - z0 = ( (bits32) aHigh ) * bHigh; - zMiddleA += zMiddleB; - z0 += ( ( (bits32) ( zMiddleA < zMiddleB ) )<<16 ) + ( zMiddleA>>16 ); - zMiddleA <<= 16; - z1 += zMiddleA; - z0 += ( z1 < zMiddleA ); - *z1Ptr = z1; - *z0Ptr = z0; - -} - -/* -------------------------------------------------------------------------------- -Multiplies the 64-bit value formed by concatenating `a0' and `a1' by `b' -to obtain a 96-bit product. The product is broken into three 32-bit pieces -which are stored at the locations pointed to by `z0Ptr', `z1Ptr', and -`z2Ptr'. -------------------------------------------------------------------------------- -*/ -INLINE void - mul64By32To96( - bits32 a0, - bits32 a1, - bits32 b, - bits32 *z0Ptr, - bits32 *z1Ptr, - bits32 *z2Ptr - ) -{ - bits32 z0, z1, z2, more1; - - mul32To64( a1, b, &z1, &z2 ); - mul32To64( a0, b, &z0, &more1 ); - add64( z0, more1, 0, z1, &z0, &z1 ); - *z2Ptr = z2; - *z1Ptr = z1; - *z0Ptr = z0; - -} - -/* -------------------------------------------------------------------------------- -Multiplies the 64-bit value formed by concatenating `a0' and `a1' to the -64-bit value formed by concatenating `b0' and `b1' to obtain a 128-bit -product. The product is broken into four 32-bit pieces which are stored at -the locations pointed to by `z0Ptr', `z1Ptr', `z2Ptr', and `z3Ptr'. -------------------------------------------------------------------------------- -*/ -INLINE void - mul64To128( - bits32 a0, - bits32 a1, - bits32 b0, - bits32 b1, - bits32 *z0Ptr, - bits32 *z1Ptr, - bits32 *z2Ptr, - bits32 *z3Ptr - ) -{ - bits32 z0, z1, z2, z3; - bits32 more1, more2; - - mul32To64( a1, b1, &z2, &z3 ); - mul32To64( a1, b0, &z1, &more2 ); - add64( z1, more2, 0, z2, &z1, &z2 ); - mul32To64( a0, b0, &z0, &more1 ); - add64( z0, more1, 0, z1, &z0, &z1 ); - mul32To64( a0, b1, &more1, &more2 ); - add64( more1, more2, 0, z2, &more1, &z2 ); - add64( z0, z1, 0, more1, &z0, &z1 ); - *z3Ptr = z3; - *z2Ptr = z2; - *z1Ptr = z1; - *z0Ptr = z0; - -} - -/* -------------------------------------------------------------------------------- -Returns an approximation to the 32-bit integer quotient obtained by dividing -`b' into the 64-bit value formed by concatenating `a0' and `a1'. The -divisor `b' must be at least 2^31. If q is the exact quotient truncated -toward zero, the approximation returned lies between q and q + 2 inclusive. -If the exact quotient q is larger than 32 bits, the maximum positive 32-bit -unsigned integer is returned. -------------------------------------------------------------------------------- -*/ -static bits32 estimateDiv64To32( bits32 a0, bits32 a1, bits32 b ) -{ - bits32 b0, b1; - bits32 rem0, rem1, term0, term1; - bits32 z; - - if ( b <= a0 ) return 0xFFFFFFFF; - b0 = b>>16; - z = ( b0<<16 <= a0 ) ? 0xFFFF0000 : ( a0 / b0 )<<16; - mul32To64( b, z, &term0, &term1 ); - sub64( a0, a1, term0, term1, &rem0, &rem1 ); - while ( ( (sbits32) rem0 ) < 0 ) { - z -= 0x10000; - b1 = b<<16; - add64( rem0, rem1, b0, b1, &rem0, &rem1 ); - } - rem0 = ( rem0<<16 ) | ( rem1>>16 ); - z |= ( b0<<16 <= rem0 ) ? 0xFFFF : rem0 / b0; - return z; - -} - -#ifndef SOFTFLOAT_FOR_GCC -/* -------------------------------------------------------------------------------- -Returns an approximation to the square root of the 32-bit significand given -by `a'. Considered as an integer, `a' must be at least 2^31. If bit 0 of -`aExp' (the least significant bit) is 1, the integer returned approximates -2^31*sqrt(`a'/2^31), where `a' is considered an integer. If bit 0 of `aExp' -is 0, the integer returned approximates 2^31*sqrt(`a'/2^30). In either -case, the approximation returned lies strictly within +/-2 of the exact -value. -------------------------------------------------------------------------------- -*/ -static bits32 estimateSqrt32( int16 aExp, bits32 a ) -{ - static const bits16 sqrtOddAdjustments[] = { - 0x0004, 0x0022, 0x005D, 0x00B1, 0x011D, 0x019F, 0x0236, 0x02E0, - 0x039C, 0x0468, 0x0545, 0x0631, 0x072B, 0x0832, 0x0946, 0x0A67 - }; - static const bits16 sqrtEvenAdjustments[] = { - 0x0A2D, 0x08AF, 0x075A, 0x0629, 0x051A, 0x0429, 0x0356, 0x029E, - 0x0200, 0x0179, 0x0109, 0x00AF, 0x0068, 0x0034, 0x0012, 0x0002 - }; - int8 index; - bits32 z; - - index = ( a>>27 ) & 15; - if ( aExp & 1 ) { - z = 0x4000 + ( a>>17 ) - sqrtOddAdjustments[ index ]; - z = ( ( a / z )<<14 ) + ( z<<15 ); - a >>= 1; - } - else { - z = 0x8000 + ( a>>17 ) - sqrtEvenAdjustments[ index ]; - z = a / z + z; - z = ( 0x20000 <= z ) ? 0xFFFF8000 : ( z<<15 ); - if ( z <= a ) return (bits32) ( ( (sbits32) a )>>1 ); - } - return ( ( estimateDiv64To32( a, 0, z ) )>>1 ) + ( z>>1 ); - -} -#endif - -/* -------------------------------------------------------------------------------- -Returns the number of leading 0 bits before the most-significant 1 bit of -`a'. If `a' is zero, 32 is returned. -------------------------------------------------------------------------------- -*/ -static int8 countLeadingZeros32( bits32 a ) -{ - static const int8 countLeadingZerosHigh[] = { - 8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }; - int8 shiftCount; - - shiftCount = 0; - if ( a < 0x10000 ) { - shiftCount += 16; - a <<= 16; - } - if ( a < 0x1000000 ) { - shiftCount += 8; - a <<= 8; - } - shiftCount += countLeadingZerosHigh[ a>>24 ]; - return shiftCount; - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the 64-bit value formed by concatenating `a0' and `a1' is -equal to the 64-bit value formed by concatenating `b0' and `b1'. Otherwise, -returns 0. -------------------------------------------------------------------------------- -*/ -INLINE flag eq64( bits32 a0, bits32 a1, bits32 b0, bits32 b1 ) -{ - - return ( a0 == b0 ) && ( a1 == b1 ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the 64-bit value formed by concatenating `a0' and `a1' is less -than or equal to the 64-bit value formed by concatenating `b0' and `b1'. -Otherwise, returns 0. -------------------------------------------------------------------------------- -*/ -INLINE flag le64( bits32 a0, bits32 a1, bits32 b0, bits32 b1 ) -{ - - return ( a0 < b0 ) || ( ( a0 == b0 ) && ( a1 <= b1 ) ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the 64-bit value formed by concatenating `a0' and `a1' is less -than the 64-bit value formed by concatenating `b0' and `b1'. Otherwise, -returns 0. -------------------------------------------------------------------------------- -*/ -INLINE flag lt64( bits32 a0, bits32 a1, bits32 b0, bits32 b1 ) -{ - - return ( a0 < b0 ) || ( ( a0 == b0 ) && ( a1 < b1 ) ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the 64-bit value formed by concatenating `a0' and `a1' is not -equal to the 64-bit value formed by concatenating `b0' and `b1'. Otherwise, -returns 0. -------------------------------------------------------------------------------- -*/ -INLINE flag ne64( bits32 a0, bits32 a1, bits32 b0, bits32 b1 ) -{ - - return ( a0 != b0 ) || ( a1 != b1 ); - -} - diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/bits32/softfloat.c b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/bits32/softfloat.c deleted file mode 100644 index 7b6edb70988c..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/bits32/softfloat.c +++ /dev/null @@ -1,2349 +0,0 @@ -/* NetBSD: softfloat.c,v 1.1 2002/05/21 23:51:07 bjh21 Exp */ - -/* - * This version hacked for use with gcc -msoft-float by bjh21. - * (Mostly a case of #ifdefing out things GCC doesn't need or provides - * itself). - */ - -/* - * Things you may want to define: - * - * SOFTFLOAT_FOR_GCC - build only those functions necessary for GCC (with - * -msoft-float) to work. Include "softfloat-for-gcc.h" to get them - * properly renamed. - */ - -/* - * This differs from the standard bits32/softfloat.c in that float64 - * is defined to be a 64-bit integer rather than a structure. The - * structure is float64s, with translation between the two going via - * float64u. - */ - -/* -=============================================================================== - -This C source file is part of the SoftFloat IEC/IEEE Floating-Point -Arithmetic Package, Release 2a. - -Written by John R. Hauser. This work was made possible in part by the -International Computer Science Institute, located at Suite 600, 1947 Center -Street, Berkeley, California 94704. Funding was partially provided by the -National Science Foundation under grant MIP-9311980. The original version -of this code was written as part of a project to build a fixed-point vector -processor in collaboration with the University of California at Berkeley, -overseen by Profs. Nelson Morgan and John Wawrzynek. More information -is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ -arithmetic/SoftFloat.html'. - -THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. - -Derivative works are acceptable, even for commercial purposes, so long as -(1) they include prominent notice that the work is derivative, and (2) they -include prominent notice akin to these four paragraphs for those parts of -this code that are retained. - -=============================================================================== -*/ - -#include -#if defined(LIBC_SCCS) && !defined(lint) -__RCSID("NetBSD: softfloat.c,v 1.1 2002/05/21 23:51:07 bjh21 Exp "); -#endif /* LIBC_SCCS and not lint */ - -#ifdef SOFTFLOAT_FOR_GCC -#include "softfloat-for-gcc.h" -#endif - -#include "milieu.h" -#include "softfloat.h" - -/* - * Conversions between floats as stored in memory and floats as - * SoftFloat uses them - */ -#ifndef FLOAT64_DEMANGLE -#define FLOAT64_DEMANGLE(a) (a) -#endif -#ifndef FLOAT64_MANGLE -#define FLOAT64_MANGLE(a) (a) -#endif - -/* -------------------------------------------------------------------------------- -Floating-point rounding mode and exception flags. -------------------------------------------------------------------------------- -*/ -fp_rnd float_rounding_mode = float_round_nearest_even; -fp_except float_exception_flags = 0; - -/* -------------------------------------------------------------------------------- -Primitive arithmetic functions, including multi-word arithmetic, and -division and square root approximations. (Can be specialized to target if -desired.) -------------------------------------------------------------------------------- -*/ -#include "softfloat-macros" - -/* -------------------------------------------------------------------------------- -Functions and definitions to determine: (1) whether tininess for underflow -is detected before or after rounding by default, (2) what (if anything) -happens when exceptions are raised, (3) how signaling NaNs are distinguished -from quiet NaNs, (4) the default generated quiet NaNs, and (4) how NaNs -are propagated from function inputs to output. These details are target- -specific. -------------------------------------------------------------------------------- -*/ -#include "softfloat-specialize" - -/* -------------------------------------------------------------------------------- -Returns the fraction bits of the single-precision floating-point value `a'. -------------------------------------------------------------------------------- -*/ -INLINE bits32 extractFloat32Frac( float32 a ) -{ - - return a & 0x007FFFFF; - -} - -/* -------------------------------------------------------------------------------- -Returns the exponent bits of the single-precision floating-point value `a'. -------------------------------------------------------------------------------- -*/ -INLINE int16 extractFloat32Exp( float32 a ) -{ - - return ( a>>23 ) & 0xFF; - -} - -/* -------------------------------------------------------------------------------- -Returns the sign bit of the single-precision floating-point value `a'. -------------------------------------------------------------------------------- -*/ -INLINE flag extractFloat32Sign( float32 a ) -{ - - return a>>31; - -} - -/* -------------------------------------------------------------------------------- -Normalizes the subnormal single-precision floating-point value represented -by the denormalized significand `aSig'. The normalized exponent and -significand are stored at the locations pointed to by `zExpPtr' and -`zSigPtr', respectively. -------------------------------------------------------------------------------- -*/ -static void - normalizeFloat32Subnormal( bits32 aSig, int16 *zExpPtr, bits32 *zSigPtr ) -{ - int8 shiftCount; - - shiftCount = countLeadingZeros32( aSig ) - 8; - *zSigPtr = aSig<>7; - zSig &= ~ ( ( ( roundBits ^ 0x40 ) == 0 ) & roundNearestEven ); - if ( zSig == 0 ) zExp = 0; - return packFloat32( zSign, zExp, zSig ); - -} - -/* -------------------------------------------------------------------------------- -Takes an abstract floating-point value having sign `zSign', exponent `zExp', -and significand `zSig', and returns the proper single-precision floating- -point value corresponding to the abstract input. This routine is just like -`roundAndPackFloat32' except that `zSig' does not have to be normalized. -Bit 31 of `zSig' must be zero, and `zExp' must be 1 less than the ``true'' -floating-point exponent. -------------------------------------------------------------------------------- -*/ -static float32 - normalizeRoundAndPackFloat32( flag zSign, int16 zExp, bits32 zSig ) -{ - int8 shiftCount; - - shiftCount = countLeadingZeros32( zSig ) - 1; - return roundAndPackFloat32( zSign, zExp - shiftCount, zSig<>32 ) & 0x000FFFFF; - -} - -/* -------------------------------------------------------------------------------- -Returns the exponent bits of the double-precision floating-point value `a'. -------------------------------------------------------------------------------- -*/ -INLINE int16 extractFloat64Exp( float64 a ) -{ - - return ( FLOAT64_DEMANGLE(a)>>52 ) & 0x7FF; - -} - -/* -------------------------------------------------------------------------------- -Returns the sign bit of the double-precision floating-point value `a'. -------------------------------------------------------------------------------- -*/ -INLINE flag extractFloat64Sign( float64 a ) -{ - - return FLOAT64_DEMANGLE(a)>>63; - -} - -/* -------------------------------------------------------------------------------- -Normalizes the subnormal double-precision floating-point value represented -by the denormalized significand formed by the concatenation of `aSig0' and -`aSig1'. The normalized exponent is stored at the location pointed to by -`zExpPtr'. The most significant 21 bits of the normalized significand are -stored at the location pointed to by `zSig0Ptr', and the least significant -32 bits of the normalized significand are stored at the location pointed to -by `zSig1Ptr'. -------------------------------------------------------------------------------- -*/ -static void - normalizeFloat64Subnormal( - bits32 aSig0, - bits32 aSig1, - int16 *zExpPtr, - bits32 *zSig0Ptr, - bits32 *zSig1Ptr - ) -{ - int8 shiftCount; - - if ( aSig0 == 0 ) { - shiftCount = countLeadingZeros32( aSig1 ) - 11; - if ( shiftCount < 0 ) { - *zSig0Ptr = aSig1>>( - shiftCount ); - *zSig1Ptr = aSig1<<( shiftCount & 31 ); - } - else { - *zSig0Ptr = aSig1<>( - shiftCount ); - } - if ( aSigExtra ) float_exception_flags |= float_flag_inexact; - roundingMode = float_rounding_mode; - if ( roundingMode == float_round_nearest_even ) { - if ( (sbits32) aSigExtra < 0 ) { - ++z; - if ( (bits32) ( aSigExtra<<1 ) == 0 ) z &= ~1; - } - if ( aSign ) z = - z; - } - else { - aSigExtra = ( aSigExtra != 0 ); - if ( aSign ) { - z += ( roundingMode == float_round_down ) & aSigExtra; - z = - z; - } - else { - z += ( roundingMode == float_round_up ) & aSigExtra; - } - } - } - return z; - -} -#endif - -/* -------------------------------------------------------------------------------- -Returns the result of converting the single-precision floating-point value -`a' to the 32-bit two's complement integer format. The conversion is -performed according to the IEC/IEEE Standard for Binary Floating-Point -Arithmetic, except that the conversion is always rounded toward zero. -If `a' is a NaN, the largest positive integer is returned. Otherwise, if -the conversion overflows, the largest integer with the same sign as `a' is -returned. -------------------------------------------------------------------------------- -*/ -int32 float32_to_int32_round_to_zero( float32 a ) -{ - flag aSign; - int16 aExp, shiftCount; - bits32 aSig; - int32 z; - - aSig = extractFloat32Frac( a ); - aExp = extractFloat32Exp( a ); - aSign = extractFloat32Sign( a ); - shiftCount = aExp - 0x9E; - if ( 0 <= shiftCount ) { - if ( a != 0xCF000000 ) { - float_raise( float_flag_invalid ); - if ( ! aSign || ( ( aExp == 0xFF ) && aSig ) ) return 0x7FFFFFFF; - } - return (sbits32) 0x80000000; - } - else if ( aExp <= 0x7E ) { - if ( aExp | aSig ) float_exception_flags |= float_flag_inexact; - return 0; - } - aSig = ( aSig | 0x00800000 )<<8; - z = aSig>>( - shiftCount ); - if ( (bits32) ( aSig<<( shiftCount & 31 ) ) ) { - float_exception_flags |= float_flag_inexact; - } - if ( aSign ) z = - z; - return z; - -} - -/* -------------------------------------------------------------------------------- -Returns the result of converting the single-precision floating-point value -`a' to the double-precision floating-point format. The conversion is -performed according to the IEC/IEEE Standard for Binary Floating-Point -Arithmetic. -------------------------------------------------------------------------------- -*/ -float64 float32_to_float64( float32 a ) -{ - flag aSign; - int16 aExp; - bits32 aSig, zSig0, zSig1; - - aSig = extractFloat32Frac( a ); - aExp = extractFloat32Exp( a ); - aSign = extractFloat32Sign( a ); - if ( aExp == 0xFF ) { - if ( aSig ) return commonNaNToFloat64( float32ToCommonNaN( a ) ); - return packFloat64( aSign, 0x7FF, 0, 0 ); - } - if ( aExp == 0 ) { - if ( aSig == 0 ) return packFloat64( aSign, 0, 0, 0 ); - normalizeFloat32Subnormal( aSig, &aExp, &aSig ); - --aExp; - } - shift64Right( aSig, 0, 3, &zSig0, &zSig1 ); - return packFloat64( aSign, aExp + 0x380, zSig0, zSig1 ); - -} - -#ifndef SOFTFLOAT_FOR_GCC -/* -------------------------------------------------------------------------------- -Rounds the single-precision floating-point value `a' to an integer, -and returns the result as a single-precision floating-point value. The -operation is performed according to the IEC/IEEE Standard for Binary -Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float32 float32_round_to_int( float32 a ) -{ - flag aSign; - int16 aExp; - bits32 lastBitMask, roundBitsMask; - int8 roundingMode; - float32 z; - - aExp = extractFloat32Exp( a ); - if ( 0x96 <= aExp ) { - if ( ( aExp == 0xFF ) && extractFloat32Frac( a ) ) { - return propagateFloat32NaN( a, a ); - } - return a; - } - if ( aExp <= 0x7E ) { - if ( (bits32) ( a<<1 ) == 0 ) return a; - float_exception_flags |= float_flag_inexact; - aSign = extractFloat32Sign( a ); - switch ( float_rounding_mode ) { - case float_round_nearest_even: - if ( ( aExp == 0x7E ) && extractFloat32Frac( a ) ) { - return packFloat32( aSign, 0x7F, 0 ); - } - break; - case float_round_to_zero: - break; - case float_round_down: - return aSign ? 0xBF800000 : 0; - case float_round_up: - return aSign ? 0x80000000 : 0x3F800000; - } - return packFloat32( aSign, 0, 0 ); - } - lastBitMask = 1; - lastBitMask <<= 0x96 - aExp; - roundBitsMask = lastBitMask - 1; - z = a; - roundingMode = float_rounding_mode; - if ( roundingMode == float_round_nearest_even ) { - z += lastBitMask>>1; - if ( ( z & roundBitsMask ) == 0 ) z &= ~ lastBitMask; - } - else if ( roundingMode != float_round_to_zero ) { - if ( extractFloat32Sign( z ) ^ ( roundingMode == float_round_up ) ) { - z += roundBitsMask; - } - } - z &= ~ roundBitsMask; - if ( z != a ) float_exception_flags |= float_flag_inexact; - return z; - -} -#endif - -/* -------------------------------------------------------------------------------- -Returns the result of adding the absolute values of the single-precision -floating-point values `a' and `b'. If `zSign' is 1, the sum is negated -before being returned. `zSign' is ignored if the result is a NaN. -The addition is performed according to the IEC/IEEE Standard for Binary -Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -static float32 addFloat32Sigs( float32 a, float32 b, flag zSign ) -{ - int16 aExp, bExp, zExp; - bits32 aSig, bSig, zSig; - int16 expDiff; - - aSig = extractFloat32Frac( a ); - aExp = extractFloat32Exp( a ); - bSig = extractFloat32Frac( b ); - bExp = extractFloat32Exp( b ); - expDiff = aExp - bExp; - aSig <<= 6; - bSig <<= 6; - if ( 0 < expDiff ) { - if ( aExp == 0xFF ) { - if ( aSig ) return propagateFloat32NaN( a, b ); - return a; - } - if ( bExp == 0 ) { - --expDiff; - } - else { - bSig |= 0x20000000; - } - shift32RightJamming( bSig, expDiff, &bSig ); - zExp = aExp; - } - else if ( expDiff < 0 ) { - if ( bExp == 0xFF ) { - if ( bSig ) return propagateFloat32NaN( a, b ); - return packFloat32( zSign, 0xFF, 0 ); - } - if ( aExp == 0 ) { - ++expDiff; - } - else { - aSig |= 0x20000000; - } - shift32RightJamming( aSig, - expDiff, &aSig ); - zExp = bExp; - } - else { - if ( aExp == 0xFF ) { - if ( aSig | bSig ) return propagateFloat32NaN( a, b ); - return a; - } - if ( aExp == 0 ) return packFloat32( zSign, 0, ( aSig + bSig )>>6 ); - zSig = 0x40000000 + aSig + bSig; - zExp = aExp; - goto roundAndPack; - } - aSig |= 0x20000000; - zSig = ( aSig + bSig )<<1; - --zExp; - if ( (sbits32) zSig < 0 ) { - zSig = aSig + bSig; - ++zExp; - } - roundAndPack: - return roundAndPackFloat32( zSign, zExp, zSig ); - -} - -/* -------------------------------------------------------------------------------- -Returns the result of subtracting the absolute values of the single- -precision floating-point values `a' and `b'. If `zSign' is 1, the -difference is negated before being returned. `zSign' is ignored if the -result is a NaN. The subtraction is performed according to the IEC/IEEE -Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -static float32 subFloat32Sigs( float32 a, float32 b, flag zSign ) -{ - int16 aExp, bExp, zExp; - bits32 aSig, bSig, zSig; - int16 expDiff; - - aSig = extractFloat32Frac( a ); - aExp = extractFloat32Exp( a ); - bSig = extractFloat32Frac( b ); - bExp = extractFloat32Exp( b ); - expDiff = aExp - bExp; - aSig <<= 7; - bSig <<= 7; - if ( 0 < expDiff ) goto aExpBigger; - if ( expDiff < 0 ) goto bExpBigger; - if ( aExp == 0xFF ) { - if ( aSig | bSig ) return propagateFloat32NaN( a, b ); - float_raise( float_flag_invalid ); - return float32_default_nan; - } - if ( aExp == 0 ) { - aExp = 1; - bExp = 1; - } - if ( bSig < aSig ) goto aBigger; - if ( aSig < bSig ) goto bBigger; - return packFloat32( float_rounding_mode == float_round_down, 0, 0 ); - bExpBigger: - if ( bExp == 0xFF ) { - if ( bSig ) return propagateFloat32NaN( a, b ); - return packFloat32( zSign ^ 1, 0xFF, 0 ); - } - if ( aExp == 0 ) { - ++expDiff; - } - else { - aSig |= 0x40000000; - } - shift32RightJamming( aSig, - expDiff, &aSig ); - bSig |= 0x40000000; - bBigger: - zSig = bSig - aSig; - zExp = bExp; - zSign ^= 1; - goto normalizeRoundAndPack; - aExpBigger: - if ( aExp == 0xFF ) { - if ( aSig ) return propagateFloat32NaN( a, b ); - return a; - } - if ( bExp == 0 ) { - --expDiff; - } - else { - bSig |= 0x40000000; - } - shift32RightJamming( bSig, expDiff, &bSig ); - aSig |= 0x40000000; - aBigger: - zSig = aSig - bSig; - zExp = aExp; - normalizeRoundAndPack: - --zExp; - return normalizeRoundAndPackFloat32( zSign, zExp, zSig ); - -} - -/* -------------------------------------------------------------------------------- -Returns the result of adding the single-precision floating-point values `a' -and `b'. The operation is performed according to the IEC/IEEE Standard for -Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float32 float32_add( float32 a, float32 b ) -{ - flag aSign, bSign; - - aSign = extractFloat32Sign( a ); - bSign = extractFloat32Sign( b ); - if ( aSign == bSign ) { - return addFloat32Sigs( a, b, aSign ); - } - else { - return subFloat32Sigs( a, b, aSign ); - } - -} - -/* -------------------------------------------------------------------------------- -Returns the result of subtracting the single-precision floating-point values -`a' and `b'. The operation is performed according to the IEC/IEEE Standard -for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float32 float32_sub( float32 a, float32 b ) -{ - flag aSign, bSign; - - aSign = extractFloat32Sign( a ); - bSign = extractFloat32Sign( b ); - if ( aSign == bSign ) { - return subFloat32Sigs( a, b, aSign ); - } - else { - return addFloat32Sigs( a, b, aSign ); - } - -} - -/* -------------------------------------------------------------------------------- -Returns the result of multiplying the single-precision floating-point values -`a' and `b'. The operation is performed according to the IEC/IEEE Standard -for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float32 float32_mul( float32 a, float32 b ) -{ - flag aSign, bSign, zSign; - int16 aExp, bExp, zExp; - bits32 aSig, bSig, zSig0, zSig1; - - aSig = extractFloat32Frac( a ); - aExp = extractFloat32Exp( a ); - aSign = extractFloat32Sign( a ); - bSig = extractFloat32Frac( b ); - bExp = extractFloat32Exp( b ); - bSign = extractFloat32Sign( b ); - zSign = aSign ^ bSign; - if ( aExp == 0xFF ) { - if ( aSig || ( ( bExp == 0xFF ) && bSig ) ) { - return propagateFloat32NaN( a, b ); - } - if ( ( bExp | bSig ) == 0 ) { - float_raise( float_flag_invalid ); - return float32_default_nan; - } - return packFloat32( zSign, 0xFF, 0 ); - } - if ( bExp == 0xFF ) { - if ( bSig ) return propagateFloat32NaN( a, b ); - if ( ( aExp | aSig ) == 0 ) { - float_raise( float_flag_invalid ); - return float32_default_nan; - } - return packFloat32( zSign, 0xFF, 0 ); - } - if ( aExp == 0 ) { - if ( aSig == 0 ) return packFloat32( zSign, 0, 0 ); - normalizeFloat32Subnormal( aSig, &aExp, &aSig ); - } - if ( bExp == 0 ) { - if ( bSig == 0 ) return packFloat32( zSign, 0, 0 ); - normalizeFloat32Subnormal( bSig, &bExp, &bSig ); - } - zExp = aExp + bExp - 0x7F; - aSig = ( aSig | 0x00800000 )<<7; - bSig = ( bSig | 0x00800000 )<<8; - mul32To64( aSig, bSig, &zSig0, &zSig1 ); - zSig0 |= ( zSig1 != 0 ); - if ( 0 <= (sbits32) ( zSig0<<1 ) ) { - zSig0 <<= 1; - --zExp; - } - return roundAndPackFloat32( zSign, zExp, zSig0 ); - -} - -/* -------------------------------------------------------------------------------- -Returns the result of dividing the single-precision floating-point value `a' -by the corresponding value `b'. The operation is performed according to the -IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float32 float32_div( float32 a, float32 b ) -{ - flag aSign, bSign, zSign; - int16 aExp, bExp, zExp; - bits32 aSig, bSig, zSig, rem0, rem1, term0, term1; - - aSig = extractFloat32Frac( a ); - aExp = extractFloat32Exp( a ); - aSign = extractFloat32Sign( a ); - bSig = extractFloat32Frac( b ); - bExp = extractFloat32Exp( b ); - bSign = extractFloat32Sign( b ); - zSign = aSign ^ bSign; - if ( aExp == 0xFF ) { - if ( aSig ) return propagateFloat32NaN( a, b ); - if ( bExp == 0xFF ) { - if ( bSig ) return propagateFloat32NaN( a, b ); - float_raise( float_flag_invalid ); - return float32_default_nan; - } - return packFloat32( zSign, 0xFF, 0 ); - } - if ( bExp == 0xFF ) { - if ( bSig ) return propagateFloat32NaN( a, b ); - return packFloat32( zSign, 0, 0 ); - } - if ( bExp == 0 ) { - if ( bSig == 0 ) { - if ( ( aExp | aSig ) == 0 ) { - float_raise( float_flag_invalid ); - return float32_default_nan; - } - float_raise( float_flag_divbyzero ); - return packFloat32( zSign, 0xFF, 0 ); - } - normalizeFloat32Subnormal( bSig, &bExp, &bSig ); - } - if ( aExp == 0 ) { - if ( aSig == 0 ) return packFloat32( zSign, 0, 0 ); - normalizeFloat32Subnormal( aSig, &aExp, &aSig ); - } - zExp = aExp - bExp + 0x7D; - aSig = ( aSig | 0x00800000 )<<7; - bSig = ( bSig | 0x00800000 )<<8; - if ( bSig <= ( aSig + aSig ) ) { - aSig >>= 1; - ++zExp; - } - zSig = estimateDiv64To32( aSig, 0, bSig ); - if ( ( zSig & 0x3F ) <= 2 ) { - mul32To64( bSig, zSig, &term0, &term1 ); - sub64( aSig, 0, term0, term1, &rem0, &rem1 ); - while ( (sbits32) rem0 < 0 ) { - --zSig; - add64( rem0, rem1, 0, bSig, &rem0, &rem1 ); - } - zSig |= ( rem1 != 0 ); - } - return roundAndPackFloat32( zSign, zExp, zSig ); - -} - -#ifndef SOFTFLOAT_FOR_GCC -/* -------------------------------------------------------------------------------- -Returns the remainder of the single-precision floating-point value `a' -with respect to the corresponding value `b'. The operation is performed -according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float32 float32_rem( float32 a, float32 b ) -{ - flag aSign, bSign, zSign; - int16 aExp, bExp, expDiff; - bits32 aSig, bSig, q, allZero, alternateASig; - sbits32 sigMean; - - aSig = extractFloat32Frac( a ); - aExp = extractFloat32Exp( a ); - aSign = extractFloat32Sign( a ); - bSig = extractFloat32Frac( b ); - bExp = extractFloat32Exp( b ); - bSign = extractFloat32Sign( b ); - if ( aExp == 0xFF ) { - if ( aSig || ( ( bExp == 0xFF ) && bSig ) ) { - return propagateFloat32NaN( a, b ); - } - float_raise( float_flag_invalid ); - return float32_default_nan; - } - if ( bExp == 0xFF ) { - if ( bSig ) return propagateFloat32NaN( a, b ); - return a; - } - if ( bExp == 0 ) { - if ( bSig == 0 ) { - float_raise( float_flag_invalid ); - return float32_default_nan; - } - normalizeFloat32Subnormal( bSig, &bExp, &bSig ); - } - if ( aExp == 0 ) { - if ( aSig == 0 ) return a; - normalizeFloat32Subnormal( aSig, &aExp, &aSig ); - } - expDiff = aExp - bExp; - aSig = ( aSig | 0x00800000 )<<8; - bSig = ( bSig | 0x00800000 )<<8; - if ( expDiff < 0 ) { - if ( expDiff < -1 ) return a; - aSig >>= 1; - } - q = ( bSig <= aSig ); - if ( q ) aSig -= bSig; - expDiff -= 32; - while ( 0 < expDiff ) { - q = estimateDiv64To32( aSig, 0, bSig ); - q = ( 2 < q ) ? q - 2 : 0; - aSig = - ( ( bSig>>2 ) * q ); - expDiff -= 30; - } - expDiff += 32; - if ( 0 < expDiff ) { - q = estimateDiv64To32( aSig, 0, bSig ); - q = ( 2 < q ) ? q - 2 : 0; - q >>= 32 - expDiff; - bSig >>= 2; - aSig = ( ( aSig>>1 )<<( expDiff - 1 ) ) - bSig * q; - } - else { - aSig >>= 2; - bSig >>= 2; - } - do { - alternateASig = aSig; - ++q; - aSig -= bSig; - } while ( 0 <= (sbits32) aSig ); - sigMean = aSig + alternateASig; - if ( ( sigMean < 0 ) || ( ( sigMean == 0 ) && ( q & 1 ) ) ) { - aSig = alternateASig; - } - zSign = ( (sbits32) aSig < 0 ); - if ( zSign ) aSig = - aSig; - return normalizeRoundAndPackFloat32( aSign ^ zSign, bExp, aSig ); - -} -#endif - -#ifndef SOFTFLOAT_FOR_GCC -/* -------------------------------------------------------------------------------- -Returns the square root of the single-precision floating-point value `a'. -The operation is performed according to the IEC/IEEE Standard for Binary -Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float32 float32_sqrt( float32 a ) -{ - flag aSign; - int16 aExp, zExp; - bits32 aSig, zSig, rem0, rem1, term0, term1; - - aSig = extractFloat32Frac( a ); - aExp = extractFloat32Exp( a ); - aSign = extractFloat32Sign( a ); - if ( aExp == 0xFF ) { - if ( aSig ) return propagateFloat32NaN( a, 0 ); - if ( ! aSign ) return a; - float_raise( float_flag_invalid ); - return float32_default_nan; - } - if ( aSign ) { - if ( ( aExp | aSig ) == 0 ) return a; - float_raise( float_flag_invalid ); - return float32_default_nan; - } - if ( aExp == 0 ) { - if ( aSig == 0 ) return 0; - normalizeFloat32Subnormal( aSig, &aExp, &aSig ); - } - zExp = ( ( aExp - 0x7F )>>1 ) + 0x7E; - aSig = ( aSig | 0x00800000 )<<8; - zSig = estimateSqrt32( aExp, aSig ) + 2; - if ( ( zSig & 0x7F ) <= 5 ) { - if ( zSig < 2 ) { - zSig = 0x7FFFFFFF; - goto roundAndPack; - } - else { - aSig >>= aExp & 1; - mul32To64( zSig, zSig, &term0, &term1 ); - sub64( aSig, 0, term0, term1, &rem0, &rem1 ); - while ( (sbits32) rem0 < 0 ) { - --zSig; - shortShift64Left( 0, zSig, 1, &term0, &term1 ); - term1 |= 1; - add64( rem0, rem1, term0, term1, &rem0, &rem1 ); - } - zSig |= ( ( rem0 | rem1 ) != 0 ); - } - } - shift32RightJamming( zSig, 1, &zSig ); - roundAndPack: - return roundAndPackFloat32( 0, zExp, zSig ); - -} -#endif - -/* -------------------------------------------------------------------------------- -Returns 1 if the single-precision floating-point value `a' is equal to -the corresponding value `b', and 0 otherwise. The comparison is performed -according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -flag float32_eq( float32 a, float32 b ) -{ - - if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) ) - || ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) ) - ) { - if ( float32_is_signaling_nan( a ) || float32_is_signaling_nan( b ) ) { - float_raise( float_flag_invalid ); - } - return 0; - } - return ( a == b ) || ( (bits32) ( ( a | b )<<1 ) == 0 ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the single-precision floating-point value `a' is less than -or equal to the corresponding value `b', and 0 otherwise. The comparison -is performed according to the IEC/IEEE Standard for Binary Floating-Point -Arithmetic. -------------------------------------------------------------------------------- -*/ -flag float32_le( float32 a, float32 b ) -{ - flag aSign, bSign; - - if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) ) - || ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) ) - ) { - float_raise( float_flag_invalid ); - return 0; - } - aSign = extractFloat32Sign( a ); - bSign = extractFloat32Sign( b ); - if ( aSign != bSign ) return aSign || ( (bits32) ( ( a | b )<<1 ) == 0 ); - return ( a == b ) || ( aSign ^ ( a < b ) ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the single-precision floating-point value `a' is less than -the corresponding value `b', and 0 otherwise. The comparison is performed -according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -flag float32_lt( float32 a, float32 b ) -{ - flag aSign, bSign; - - if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) ) - || ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) ) - ) { - float_raise( float_flag_invalid ); - return 0; - } - aSign = extractFloat32Sign( a ); - bSign = extractFloat32Sign( b ); - if ( aSign != bSign ) return aSign && ( (bits32) ( ( a | b )<<1 ) != 0 ); - return ( a != b ) && ( aSign ^ ( a < b ) ); - -} - -#ifndef SOFTFLOAT_FOR_GCC /* Not needed */ -/* -------------------------------------------------------------------------------- -Returns 1 if the single-precision floating-point value `a' is equal to -the corresponding value `b', and 0 otherwise. The invalid exception is -raised if either operand is a NaN. Otherwise, the comparison is performed -according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -flag float32_eq_signaling( float32 a, float32 b ) -{ - - if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) ) - || ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) ) - ) { - float_raise( float_flag_invalid ); - return 0; - } - return ( a == b ) || ( (bits32) ( ( a | b )<<1 ) == 0 ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the single-precision floating-point value `a' is less than or -equal to the corresponding value `b', and 0 otherwise. Quiet NaNs do not -cause an exception. Otherwise, the comparison is performed according to the -IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -flag float32_le_quiet( float32 a, float32 b ) -{ - flag aSign, bSign; - int16 aExp, bExp; - - if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) ) - || ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) ) - ) { - if ( float32_is_signaling_nan( a ) || float32_is_signaling_nan( b ) ) { - float_raise( float_flag_invalid ); - } - return 0; - } - aSign = extractFloat32Sign( a ); - bSign = extractFloat32Sign( b ); - if ( aSign != bSign ) return aSign || ( (bits32) ( ( a | b )<<1 ) == 0 ); - return ( a == b ) || ( aSign ^ ( a < b ) ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the single-precision floating-point value `a' is less than -the corresponding value `b', and 0 otherwise. Quiet NaNs do not cause an -exception. Otherwise, the comparison is performed according to the IEC/IEEE -Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -flag float32_lt_quiet( float32 a, float32 b ) -{ - flag aSign, bSign; - - if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) ) - || ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) ) - ) { - if ( float32_is_signaling_nan( a ) || float32_is_signaling_nan( b ) ) { - float_raise( float_flag_invalid ); - } - return 0; - } - aSign = extractFloat32Sign( a ); - bSign = extractFloat32Sign( b ); - if ( aSign != bSign ) return aSign && ( (bits32) ( ( a | b )<<1 ) != 0 ); - return ( a != b ) && ( aSign ^ ( a < b ) ); - -} -#endif /* !SOFTFLOAT_FOR_GCC */ - -#ifndef SOFTFLOAT_FOR_GCC /* Not needed */ -/* -------------------------------------------------------------------------------- -Returns the result of converting the double-precision floating-point value -`a' to the 32-bit two's complement integer format. The conversion is -performed according to the IEC/IEEE Standard for Binary Floating-Point -Arithmetic---which means in particular that the conversion is rounded -according to the current rounding mode. If `a' is a NaN, the largest -positive integer is returned. Otherwise, if the conversion overflows, the -largest integer with the same sign as `a' is returned. -------------------------------------------------------------------------------- -*/ -int32 float64_to_int32( float64 a ) -{ - flag aSign; - int16 aExp, shiftCount; - bits32 aSig0, aSig1, absZ, aSigExtra; - int32 z; - int8 roundingMode; - - aSig1 = extractFloat64Frac1( a ); - aSig0 = extractFloat64Frac0( a ); - aExp = extractFloat64Exp( a ); - aSign = extractFloat64Sign( a ); - shiftCount = aExp - 0x413; - if ( 0 <= shiftCount ) { - if ( 0x41E < aExp ) { - if ( ( aExp == 0x7FF ) && ( aSig0 | aSig1 ) ) aSign = 0; - goto invalid; - } - shortShift64Left( - aSig0 | 0x00100000, aSig1, shiftCount, &absZ, &aSigExtra ); - if ( 0x80000000 < absZ ) goto invalid; - } - else { - aSig1 = ( aSig1 != 0 ); - if ( aExp < 0x3FE ) { - aSigExtra = aExp | aSig0 | aSig1; - absZ = 0; - } - else { - aSig0 |= 0x00100000; - aSigExtra = ( aSig0<<( shiftCount & 31 ) ) | aSig1; - absZ = aSig0>>( - shiftCount ); - } - } - roundingMode = float_rounding_mode; - if ( roundingMode == float_round_nearest_even ) { - if ( (sbits32) aSigExtra < 0 ) { - ++absZ; - if ( (bits32) ( aSigExtra<<1 ) == 0 ) absZ &= ~1; - } - z = aSign ? - absZ : absZ; - } - else { - aSigExtra = ( aSigExtra != 0 ); - if ( aSign ) { - z = - ( absZ - + ( ( roundingMode == float_round_down ) & aSigExtra ) ); - } - else { - z = absZ + ( ( roundingMode == float_round_up ) & aSigExtra ); - } - } - if ( ( aSign ^ ( z < 0 ) ) && z ) { - invalid: - float_raise( float_flag_invalid ); - return aSign ? (sbits32) 0x80000000 : 0x7FFFFFFF; - } - if ( aSigExtra ) float_exception_flags |= float_flag_inexact; - return z; - -} -#endif /* !SOFTFLOAT_FOR_GCC */ - -/* -------------------------------------------------------------------------------- -Returns the result of converting the double-precision floating-point value -`a' to the 32-bit two's complement integer format. The conversion is -performed according to the IEC/IEEE Standard for Binary Floating-Point -Arithmetic, except that the conversion is always rounded toward zero. -If `a' is a NaN, the largest positive integer is returned. Otherwise, if -the conversion overflows, the largest integer with the same sign as `a' is -returned. -------------------------------------------------------------------------------- -*/ -int32 float64_to_int32_round_to_zero( float64 a ) -{ - flag aSign; - int16 aExp, shiftCount; - bits32 aSig0, aSig1, absZ, aSigExtra; - int32 z; - - aSig1 = extractFloat64Frac1( a ); - aSig0 = extractFloat64Frac0( a ); - aExp = extractFloat64Exp( a ); - aSign = extractFloat64Sign( a ); - shiftCount = aExp - 0x413; - if ( 0 <= shiftCount ) { - if ( 0x41E < aExp ) { - if ( ( aExp == 0x7FF ) && ( aSig0 | aSig1 ) ) aSign = 0; - goto invalid; - } - shortShift64Left( - aSig0 | 0x00100000, aSig1, shiftCount, &absZ, &aSigExtra ); - } - else { - if ( aExp < 0x3FF ) { - if ( aExp | aSig0 | aSig1 ) { - float_exception_flags |= float_flag_inexact; - } - return 0; - } - aSig0 |= 0x00100000; - aSigExtra = ( aSig0<<( shiftCount & 31 ) ) | aSig1; - absZ = aSig0>>( - shiftCount ); - } - z = aSign ? - absZ : absZ; - if ( ( aSign ^ ( z < 0 ) ) && z ) { - invalid: - float_raise( float_flag_invalid ); - return aSign ? (sbits32) 0x80000000 : 0x7FFFFFFF; - } - if ( aSigExtra ) float_exception_flags |= float_flag_inexact; - return z; - -} - -/* -------------------------------------------------------------------------------- -Returns the result of converting the double-precision floating-point value -`a' to the single-precision floating-point format. The conversion is -performed according to the IEC/IEEE Standard for Binary Floating-Point -Arithmetic. -------------------------------------------------------------------------------- -*/ -float32 float64_to_float32( float64 a ) -{ - flag aSign; - int16 aExp; - bits32 aSig0, aSig1, zSig; - bits32 allZero; - - aSig1 = extractFloat64Frac1( a ); - aSig0 = extractFloat64Frac0( a ); - aExp = extractFloat64Exp( a ); - aSign = extractFloat64Sign( a ); - if ( aExp == 0x7FF ) { - if ( aSig0 | aSig1 ) { - return commonNaNToFloat32( float64ToCommonNaN( a ) ); - } - return packFloat32( aSign, 0xFF, 0 ); - } - shift64RightJamming( aSig0, aSig1, 22, &allZero, &zSig ); - if ( aExp ) zSig |= 0x40000000; - return roundAndPackFloat32( aSign, aExp - 0x381, zSig ); - -} - -#ifndef SOFTFLOAT_FOR_GCC -/* -------------------------------------------------------------------------------- -Rounds the double-precision floating-point value `a' to an integer, -and returns the result as a double-precision floating-point value. The -operation is performed according to the IEC/IEEE Standard for Binary -Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float64 float64_round_to_int( float64 a ) -{ - flag aSign; - int16 aExp; - bits32 lastBitMask, roundBitsMask; - int8 roundingMode; - float64 z; - - aExp = extractFloat64Exp( a ); - if ( 0x413 <= aExp ) { - if ( 0x433 <= aExp ) { - if ( ( aExp == 0x7FF ) - && ( extractFloat64Frac0( a ) | extractFloat64Frac1( a ) ) ) { - return propagateFloat64NaN( a, a ); - } - return a; - } - lastBitMask = 1; - lastBitMask = ( lastBitMask<<( 0x432 - aExp ) )<<1; - roundBitsMask = lastBitMask - 1; - z = a; - roundingMode = float_rounding_mode; - if ( roundingMode == float_round_nearest_even ) { - if ( lastBitMask ) { - add64( z.high, z.low, 0, lastBitMask>>1, &z.high, &z.low ); - if ( ( z.low & roundBitsMask ) == 0 ) z.low &= ~ lastBitMask; - } - else { - if ( (sbits32) z.low < 0 ) { - ++z.high; - if ( (bits32) ( z.low<<1 ) == 0 ) z.high &= ~1; - } - } - } - else if ( roundingMode != float_round_to_zero ) { - if ( extractFloat64Sign( z ) - ^ ( roundingMode == float_round_up ) ) { - add64( z.high, z.low, 0, roundBitsMask, &z.high, &z.low ); - } - } - z.low &= ~ roundBitsMask; - } - else { - if ( aExp <= 0x3FE ) { - if ( ( ( (bits32) ( a.high<<1 ) ) | a.low ) == 0 ) return a; - float_exception_flags |= float_flag_inexact; - aSign = extractFloat64Sign( a ); - switch ( float_rounding_mode ) { - case float_round_nearest_even: - if ( ( aExp == 0x3FE ) - && ( extractFloat64Frac0( a ) | extractFloat64Frac1( a ) ) - ) { - return packFloat64( aSign, 0x3FF, 0, 0 ); - } - break; - case float_round_down: - return - aSign ? packFloat64( 1, 0x3FF, 0, 0 ) - : packFloat64( 0, 0, 0, 0 ); - case float_round_up: - return - aSign ? packFloat64( 1, 0, 0, 0 ) - : packFloat64( 0, 0x3FF, 0, 0 ); - } - return packFloat64( aSign, 0, 0, 0 ); - } - lastBitMask = 1; - lastBitMask <<= 0x413 - aExp; - roundBitsMask = lastBitMask - 1; - z.low = 0; - z.high = a.high; - roundingMode = float_rounding_mode; - if ( roundingMode == float_round_nearest_even ) { - z.high += lastBitMask>>1; - if ( ( ( z.high & roundBitsMask ) | a.low ) == 0 ) { - z.high &= ~ lastBitMask; - } - } - else if ( roundingMode != float_round_to_zero ) { - if ( extractFloat64Sign( z ) - ^ ( roundingMode == float_round_up ) ) { - z.high |= ( a.low != 0 ); - z.high += roundBitsMask; - } - } - z.high &= ~ roundBitsMask; - } - if ( ( z.low != a.low ) || ( z.high != a.high ) ) { - float_exception_flags |= float_flag_inexact; - } - return z; - -} -#endif - -/* -------------------------------------------------------------------------------- -Returns the result of adding the absolute values of the double-precision -floating-point values `a' and `b'. If `zSign' is 1, the sum is negated -before being returned. `zSign' is ignored if the result is a NaN. -The addition is performed according to the IEC/IEEE Standard for Binary -Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -static float64 addFloat64Sigs( float64 a, float64 b, flag zSign ) -{ - int16 aExp, bExp, zExp; - bits32 aSig0, aSig1, bSig0, bSig1, zSig0, zSig1, zSig2; - int16 expDiff; - - aSig1 = extractFloat64Frac1( a ); - aSig0 = extractFloat64Frac0( a ); - aExp = extractFloat64Exp( a ); - bSig1 = extractFloat64Frac1( b ); - bSig0 = extractFloat64Frac0( b ); - bExp = extractFloat64Exp( b ); - expDiff = aExp - bExp; - if ( 0 < expDiff ) { - if ( aExp == 0x7FF ) { - if ( aSig0 | aSig1 ) return propagateFloat64NaN( a, b ); - return a; - } - if ( bExp == 0 ) { - --expDiff; - } - else { - bSig0 |= 0x00100000; - } - shift64ExtraRightJamming( - bSig0, bSig1, 0, expDiff, &bSig0, &bSig1, &zSig2 ); - zExp = aExp; - } - else if ( expDiff < 0 ) { - if ( bExp == 0x7FF ) { - if ( bSig0 | bSig1 ) return propagateFloat64NaN( a, b ); - return packFloat64( zSign, 0x7FF, 0, 0 ); - } - if ( aExp == 0 ) { - ++expDiff; - } - else { - aSig0 |= 0x00100000; - } - shift64ExtraRightJamming( - aSig0, aSig1, 0, - expDiff, &aSig0, &aSig1, &zSig2 ); - zExp = bExp; - } - else { - if ( aExp == 0x7FF ) { - if ( aSig0 | aSig1 | bSig0 | bSig1 ) { - return propagateFloat64NaN( a, b ); - } - return a; - } - add64( aSig0, aSig1, bSig0, bSig1, &zSig0, &zSig1 ); - if ( aExp == 0 ) return packFloat64( zSign, 0, zSig0, zSig1 ); - zSig2 = 0; - zSig0 |= 0x00200000; - zExp = aExp; - goto shiftRight1; - } - aSig0 |= 0x00100000; - add64( aSig0, aSig1, bSig0, bSig1, &zSig0, &zSig1 ); - --zExp; - if ( zSig0 < 0x00200000 ) goto roundAndPack; - ++zExp; - shiftRight1: - shift64ExtraRightJamming( zSig0, zSig1, zSig2, 1, &zSig0, &zSig1, &zSig2 ); - roundAndPack: - return roundAndPackFloat64( zSign, zExp, zSig0, zSig1, zSig2 ); - -} - -/* -------------------------------------------------------------------------------- -Returns the result of subtracting the absolute values of the double- -precision floating-point values `a' and `b'. If `zSign' is 1, the -difference is negated before being returned. `zSign' is ignored if the -result is a NaN. The subtraction is performed according to the IEC/IEEE -Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -static float64 subFloat64Sigs( float64 a, float64 b, flag zSign ) -{ - int16 aExp, bExp, zExp; - bits32 aSig0, aSig1, bSig0, bSig1, zSig0, zSig1; - int16 expDiff; - - aSig1 = extractFloat64Frac1( a ); - aSig0 = extractFloat64Frac0( a ); - aExp = extractFloat64Exp( a ); - bSig1 = extractFloat64Frac1( b ); - bSig0 = extractFloat64Frac0( b ); - bExp = extractFloat64Exp( b ); - expDiff = aExp - bExp; - shortShift64Left( aSig0, aSig1, 10, &aSig0, &aSig1 ); - shortShift64Left( bSig0, bSig1, 10, &bSig0, &bSig1 ); - if ( 0 < expDiff ) goto aExpBigger; - if ( expDiff < 0 ) goto bExpBigger; - if ( aExp == 0x7FF ) { - if ( aSig0 | aSig1 | bSig0 | bSig1 ) { - return propagateFloat64NaN( a, b ); - } - float_raise( float_flag_invalid ); - return float64_default_nan; - } - if ( aExp == 0 ) { - aExp = 1; - bExp = 1; - } - if ( bSig0 < aSig0 ) goto aBigger; - if ( aSig0 < bSig0 ) goto bBigger; - if ( bSig1 < aSig1 ) goto aBigger; - if ( aSig1 < bSig1 ) goto bBigger; - return packFloat64( float_rounding_mode == float_round_down, 0, 0, 0 ); - bExpBigger: - if ( bExp == 0x7FF ) { - if ( bSig0 | bSig1 ) return propagateFloat64NaN( a, b ); - return packFloat64( zSign ^ 1, 0x7FF, 0, 0 ); - } - if ( aExp == 0 ) { - ++expDiff; - } - else { - aSig0 |= 0x40000000; - } - shift64RightJamming( aSig0, aSig1, - expDiff, &aSig0, &aSig1 ); - bSig0 |= 0x40000000; - bBigger: - sub64( bSig0, bSig1, aSig0, aSig1, &zSig0, &zSig1 ); - zExp = bExp; - zSign ^= 1; - goto normalizeRoundAndPack; - aExpBigger: - if ( aExp == 0x7FF ) { - if ( aSig0 | aSig1 ) return propagateFloat64NaN( a, b ); - return a; - } - if ( bExp == 0 ) { - --expDiff; - } - else { - bSig0 |= 0x40000000; - } - shift64RightJamming( bSig0, bSig1, expDiff, &bSig0, &bSig1 ); - aSig0 |= 0x40000000; - aBigger: - sub64( aSig0, aSig1, bSig0, bSig1, &zSig0, &zSig1 ); - zExp = aExp; - normalizeRoundAndPack: - --zExp; - return normalizeRoundAndPackFloat64( zSign, zExp - 10, zSig0, zSig1 ); - -} - -/* -------------------------------------------------------------------------------- -Returns the result of adding the double-precision floating-point values `a' -and `b'. The operation is performed according to the IEC/IEEE Standard for -Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float64 float64_add( float64 a, float64 b ) -{ - flag aSign, bSign; - - aSign = extractFloat64Sign( a ); - bSign = extractFloat64Sign( b ); - if ( aSign == bSign ) { - return addFloat64Sigs( a, b, aSign ); - } - else { - return subFloat64Sigs( a, b, aSign ); - } - -} - -/* -------------------------------------------------------------------------------- -Returns the result of subtracting the double-precision floating-point values -`a' and `b'. The operation is performed according to the IEC/IEEE Standard -for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float64 float64_sub( float64 a, float64 b ) -{ - flag aSign, bSign; - - aSign = extractFloat64Sign( a ); - bSign = extractFloat64Sign( b ); - if ( aSign == bSign ) { - return subFloat64Sigs( a, b, aSign ); - } - else { - return addFloat64Sigs( a, b, aSign ); - } - -} - -/* -------------------------------------------------------------------------------- -Returns the result of multiplying the double-precision floating-point values -`a' and `b'. The operation is performed according to the IEC/IEEE Standard -for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float64 float64_mul( float64 a, float64 b ) -{ - flag aSign, bSign, zSign; - int16 aExp, bExp, zExp; - bits32 aSig0, aSig1, bSig0, bSig1, zSig0, zSig1, zSig2, zSig3; - - aSig1 = extractFloat64Frac1( a ); - aSig0 = extractFloat64Frac0( a ); - aExp = extractFloat64Exp( a ); - aSign = extractFloat64Sign( a ); - bSig1 = extractFloat64Frac1( b ); - bSig0 = extractFloat64Frac0( b ); - bExp = extractFloat64Exp( b ); - bSign = extractFloat64Sign( b ); - zSign = aSign ^ bSign; - if ( aExp == 0x7FF ) { - if ( ( aSig0 | aSig1 ) - || ( ( bExp == 0x7FF ) && ( bSig0 | bSig1 ) ) ) { - return propagateFloat64NaN( a, b ); - } - if ( ( bExp | bSig0 | bSig1 ) == 0 ) goto invalid; - return packFloat64( zSign, 0x7FF, 0, 0 ); - } - if ( bExp == 0x7FF ) { - if ( bSig0 | bSig1 ) return propagateFloat64NaN( a, b ); - if ( ( aExp | aSig0 | aSig1 ) == 0 ) { - invalid: - float_raise( float_flag_invalid ); - return float64_default_nan; - } - return packFloat64( zSign, 0x7FF, 0, 0 ); - } - if ( aExp == 0 ) { - if ( ( aSig0 | aSig1 ) == 0 ) return packFloat64( zSign, 0, 0, 0 ); - normalizeFloat64Subnormal( aSig0, aSig1, &aExp, &aSig0, &aSig1 ); - } - if ( bExp == 0 ) { - if ( ( bSig0 | bSig1 ) == 0 ) return packFloat64( zSign, 0, 0, 0 ); - normalizeFloat64Subnormal( bSig0, bSig1, &bExp, &bSig0, &bSig1 ); - } - zExp = aExp + bExp - 0x400; - aSig0 |= 0x00100000; - shortShift64Left( bSig0, bSig1, 12, &bSig0, &bSig1 ); - mul64To128( aSig0, aSig1, bSig0, bSig1, &zSig0, &zSig1, &zSig2, &zSig3 ); - add64( zSig0, zSig1, aSig0, aSig1, &zSig0, &zSig1 ); - zSig2 |= ( zSig3 != 0 ); - if ( 0x00200000 <= zSig0 ) { - shift64ExtraRightJamming( - zSig0, zSig1, zSig2, 1, &zSig0, &zSig1, &zSig2 ); - ++zExp; - } - return roundAndPackFloat64( zSign, zExp, zSig0, zSig1, zSig2 ); - -} - -/* -------------------------------------------------------------------------------- -Returns the result of dividing the double-precision floating-point value `a' -by the corresponding value `b'. The operation is performed according to the -IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float64 float64_div( float64 a, float64 b ) -{ - flag aSign, bSign, zSign; - int16 aExp, bExp, zExp; - bits32 aSig0, aSig1, bSig0, bSig1, zSig0, zSig1, zSig2; - bits32 rem0, rem1, rem2, rem3, term0, term1, term2, term3; - - aSig1 = extractFloat64Frac1( a ); - aSig0 = extractFloat64Frac0( a ); - aExp = extractFloat64Exp( a ); - aSign = extractFloat64Sign( a ); - bSig1 = extractFloat64Frac1( b ); - bSig0 = extractFloat64Frac0( b ); - bExp = extractFloat64Exp( b ); - bSign = extractFloat64Sign( b ); - zSign = aSign ^ bSign; - if ( aExp == 0x7FF ) { - if ( aSig0 | aSig1 ) return propagateFloat64NaN( a, b ); - if ( bExp == 0x7FF ) { - if ( bSig0 | bSig1 ) return propagateFloat64NaN( a, b ); - goto invalid; - } - return packFloat64( zSign, 0x7FF, 0, 0 ); - } - if ( bExp == 0x7FF ) { - if ( bSig0 | bSig1 ) return propagateFloat64NaN( a, b ); - return packFloat64( zSign, 0, 0, 0 ); - } - if ( bExp == 0 ) { - if ( ( bSig0 | bSig1 ) == 0 ) { - if ( ( aExp | aSig0 | aSig1 ) == 0 ) { - invalid: - float_raise( float_flag_invalid ); - return float64_default_nan; - } - float_raise( float_flag_divbyzero ); - return packFloat64( zSign, 0x7FF, 0, 0 ); - } - normalizeFloat64Subnormal( bSig0, bSig1, &bExp, &bSig0, &bSig1 ); - } - if ( aExp == 0 ) { - if ( ( aSig0 | aSig1 ) == 0 ) return packFloat64( zSign, 0, 0, 0 ); - normalizeFloat64Subnormal( aSig0, aSig1, &aExp, &aSig0, &aSig1 ); - } - zExp = aExp - bExp + 0x3FD; - shortShift64Left( aSig0 | 0x00100000, aSig1, 11, &aSig0, &aSig1 ); - shortShift64Left( bSig0 | 0x00100000, bSig1, 11, &bSig0, &bSig1 ); - if ( le64( bSig0, bSig1, aSig0, aSig1 ) ) { - shift64Right( aSig0, aSig1, 1, &aSig0, &aSig1 ); - ++zExp; - } - zSig0 = estimateDiv64To32( aSig0, aSig1, bSig0 ); - mul64By32To96( bSig0, bSig1, zSig0, &term0, &term1, &term2 ); - sub96( aSig0, aSig1, 0, term0, term1, term2, &rem0, &rem1, &rem2 ); - while ( (sbits32) rem0 < 0 ) { - --zSig0; - add96( rem0, rem1, rem2, 0, bSig0, bSig1, &rem0, &rem1, &rem2 ); - } - zSig1 = estimateDiv64To32( rem1, rem2, bSig0 ); - if ( ( zSig1 & 0x3FF ) <= 4 ) { - mul64By32To96( bSig0, bSig1, zSig1, &term1, &term2, &term3 ); - sub96( rem1, rem2, 0, term1, term2, term3, &rem1, &rem2, &rem3 ); - while ( (sbits32) rem1 < 0 ) { - --zSig1; - add96( rem1, rem2, rem3, 0, bSig0, bSig1, &rem1, &rem2, &rem3 ); - } - zSig1 |= ( ( rem1 | rem2 | rem3 ) != 0 ); - } - shift64ExtraRightJamming( zSig0, zSig1, 0, 11, &zSig0, &zSig1, &zSig2 ); - return roundAndPackFloat64( zSign, zExp, zSig0, zSig1, zSig2 ); - -} - -#ifndef SOFTFLOAT_FOR_GCC -/* -------------------------------------------------------------------------------- -Returns the remainder of the double-precision floating-point value `a' -with respect to the corresponding value `b'. The operation is performed -according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float64 float64_rem( float64 a, float64 b ) -{ - flag aSign, bSign, zSign; - int16 aExp, bExp, expDiff; - bits32 aSig0, aSig1, bSig0, bSig1, q, term0, term1, term2; - bits32 allZero, alternateASig0, alternateASig1, sigMean1; - sbits32 sigMean0; - float64 z; - - aSig1 = extractFloat64Frac1( a ); - aSig0 = extractFloat64Frac0( a ); - aExp = extractFloat64Exp( a ); - aSign = extractFloat64Sign( a ); - bSig1 = extractFloat64Frac1( b ); - bSig0 = extractFloat64Frac0( b ); - bExp = extractFloat64Exp( b ); - bSign = extractFloat64Sign( b ); - if ( aExp == 0x7FF ) { - if ( ( aSig0 | aSig1 ) - || ( ( bExp == 0x7FF ) && ( bSig0 | bSig1 ) ) ) { - return propagateFloat64NaN( a, b ); - } - goto invalid; - } - if ( bExp == 0x7FF ) { - if ( bSig0 | bSig1 ) return propagateFloat64NaN( a, b ); - return a; - } - if ( bExp == 0 ) { - if ( ( bSig0 | bSig1 ) == 0 ) { - invalid: - float_raise( float_flag_invalid ); - return float64_default_nan; - } - normalizeFloat64Subnormal( bSig0, bSig1, &bExp, &bSig0, &bSig1 ); - } - if ( aExp == 0 ) { - if ( ( aSig0 | aSig1 ) == 0 ) return a; - normalizeFloat64Subnormal( aSig0, aSig1, &aExp, &aSig0, &aSig1 ); - } - expDiff = aExp - bExp; - if ( expDiff < -1 ) return a; - shortShift64Left( - aSig0 | 0x00100000, aSig1, 11 - ( expDiff < 0 ), &aSig0, &aSig1 ); - shortShift64Left( bSig0 | 0x00100000, bSig1, 11, &bSig0, &bSig1 ); - q = le64( bSig0, bSig1, aSig0, aSig1 ); - if ( q ) sub64( aSig0, aSig1, bSig0, bSig1, &aSig0, &aSig1 ); - expDiff -= 32; - while ( 0 < expDiff ) { - q = estimateDiv64To32( aSig0, aSig1, bSig0 ); - q = ( 4 < q ) ? q - 4 : 0; - mul64By32To96( bSig0, bSig1, q, &term0, &term1, &term2 ); - shortShift96Left( term0, term1, term2, 29, &term1, &term2, &allZero ); - shortShift64Left( aSig0, aSig1, 29, &aSig0, &allZero ); - sub64( aSig0, 0, term1, term2, &aSig0, &aSig1 ); - expDiff -= 29; - } - if ( -32 < expDiff ) { - q = estimateDiv64To32( aSig0, aSig1, bSig0 ); - q = ( 4 < q ) ? q - 4 : 0; - q >>= - expDiff; - shift64Right( bSig0, bSig1, 8, &bSig0, &bSig1 ); - expDiff += 24; - if ( expDiff < 0 ) { - shift64Right( aSig0, aSig1, - expDiff, &aSig0, &aSig1 ); - } - else { - shortShift64Left( aSig0, aSig1, expDiff, &aSig0, &aSig1 ); - } - mul64By32To96( bSig0, bSig1, q, &term0, &term1, &term2 ); - sub64( aSig0, aSig1, term1, term2, &aSig0, &aSig1 ); - } - else { - shift64Right( aSig0, aSig1, 8, &aSig0, &aSig1 ); - shift64Right( bSig0, bSig1, 8, &bSig0, &bSig1 ); - } - do { - alternateASig0 = aSig0; - alternateASig1 = aSig1; - ++q; - sub64( aSig0, aSig1, bSig0, bSig1, &aSig0, &aSig1 ); - } while ( 0 <= (sbits32) aSig0 ); - add64( - aSig0, aSig1, alternateASig0, alternateASig1, &sigMean0, &sigMean1 ); - if ( ( sigMean0 < 0 ) - || ( ( ( sigMean0 | sigMean1 ) == 0 ) && ( q & 1 ) ) ) { - aSig0 = alternateASig0; - aSig1 = alternateASig1; - } - zSign = ( (sbits32) aSig0 < 0 ); - if ( zSign ) sub64( 0, 0, aSig0, aSig1, &aSig0, &aSig1 ); - return - normalizeRoundAndPackFloat64( aSign ^ zSign, bExp - 4, aSig0, aSig1 ); - -} -#endif - -#ifndef SOFTFLOAT_FOR_GCC -/* -------------------------------------------------------------------------------- -Returns the square root of the double-precision floating-point value `a'. -The operation is performed according to the IEC/IEEE Standard for Binary -Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float64 float64_sqrt( float64 a ) -{ - flag aSign; - int16 aExp, zExp; - bits32 aSig0, aSig1, zSig0, zSig1, zSig2, doubleZSig0; - bits32 rem0, rem1, rem2, rem3, term0, term1, term2, term3; - float64 z; - - aSig1 = extractFloat64Frac1( a ); - aSig0 = extractFloat64Frac0( a ); - aExp = extractFloat64Exp( a ); - aSign = extractFloat64Sign( a ); - if ( aExp == 0x7FF ) { - if ( aSig0 | aSig1 ) return propagateFloat64NaN( a, a ); - if ( ! aSign ) return a; - goto invalid; - } - if ( aSign ) { - if ( ( aExp | aSig0 | aSig1 ) == 0 ) return a; - invalid: - float_raise( float_flag_invalid ); - return float64_default_nan; - } - if ( aExp == 0 ) { - if ( ( aSig0 | aSig1 ) == 0 ) return packFloat64( 0, 0, 0, 0 ); - normalizeFloat64Subnormal( aSig0, aSig1, &aExp, &aSig0, &aSig1 ); - } - zExp = ( ( aExp - 0x3FF )>>1 ) + 0x3FE; - aSig0 |= 0x00100000; - shortShift64Left( aSig0, aSig1, 11, &term0, &term1 ); - zSig0 = ( estimateSqrt32( aExp, term0 )>>1 ) + 1; - if ( zSig0 == 0 ) zSig0 = 0x7FFFFFFF; - doubleZSig0 = zSig0 + zSig0; - shortShift64Left( aSig0, aSig1, 9 - ( aExp & 1 ), &aSig0, &aSig1 ); - mul32To64( zSig0, zSig0, &term0, &term1 ); - sub64( aSig0, aSig1, term0, term1, &rem0, &rem1 ); - while ( (sbits32) rem0 < 0 ) { - --zSig0; - doubleZSig0 -= 2; - add64( rem0, rem1, 0, doubleZSig0 | 1, &rem0, &rem1 ); - } - zSig1 = estimateDiv64To32( rem1, 0, doubleZSig0 ); - if ( ( zSig1 & 0x1FF ) <= 5 ) { - if ( zSig1 == 0 ) zSig1 = 1; - mul32To64( doubleZSig0, zSig1, &term1, &term2 ); - sub64( rem1, 0, term1, term2, &rem1, &rem2 ); - mul32To64( zSig1, zSig1, &term2, &term3 ); - sub96( rem1, rem2, 0, 0, term2, term3, &rem1, &rem2, &rem3 ); - while ( (sbits32) rem1 < 0 ) { - --zSig1; - shortShift64Left( 0, zSig1, 1, &term2, &term3 ); - term3 |= 1; - term2 |= doubleZSig0; - add96( rem1, rem2, rem3, 0, term2, term3, &rem1, &rem2, &rem3 ); - } - zSig1 |= ( ( rem1 | rem2 | rem3 ) != 0 ); - } - shift64ExtraRightJamming( zSig0, zSig1, 0, 10, &zSig0, &zSig1, &zSig2 ); - return roundAndPackFloat64( 0, zExp, zSig0, zSig1, zSig2 ); - -} -#endif - -/* -------------------------------------------------------------------------------- -Returns 1 if the double-precision floating-point value `a' is equal to -the corresponding value `b', and 0 otherwise. The comparison is performed -according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -flag float64_eq( float64 a, float64 b ) -{ - - if ( ( ( extractFloat64Exp( a ) == 0x7FF ) - && ( extractFloat64Frac0( a ) | extractFloat64Frac1( a ) ) ) - || ( ( extractFloat64Exp( b ) == 0x7FF ) - && ( extractFloat64Frac0( b ) | extractFloat64Frac1( b ) ) ) - ) { - if ( float64_is_signaling_nan( a ) || float64_is_signaling_nan( b ) ) { - float_raise( float_flag_invalid ); - } - return 0; - } - return ( a == b ) || - ( (bits64) ( ( FLOAT64_DEMANGLE(a) | FLOAT64_DEMANGLE(b) )<<1 ) == 0 ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the double-precision floating-point value `a' is less than -or equal to the corresponding value `b', and 0 otherwise. The comparison -is performed according to the IEC/IEEE Standard for Binary Floating-Point -Arithmetic. -------------------------------------------------------------------------------- -*/ -flag float64_le( float64 a, float64 b ) -{ - flag aSign, bSign; - - if ( ( ( extractFloat64Exp( a ) == 0x7FF ) - && ( extractFloat64Frac0( a ) | extractFloat64Frac1( a ) ) ) - || ( ( extractFloat64Exp( b ) == 0x7FF ) - && ( extractFloat64Frac0( b ) | extractFloat64Frac1( b ) ) ) - ) { - float_raise( float_flag_invalid ); - return 0; - } - aSign = extractFloat64Sign( a ); - bSign = extractFloat64Sign( b ); - if ( aSign != bSign ) - return aSign || - ( (bits64) ( ( FLOAT64_DEMANGLE(a) | FLOAT64_DEMANGLE(b) )<<1 ) == - 0 ); - return ( a == b ) || - ( aSign ^ ( FLOAT64_DEMANGLE(a) < FLOAT64_DEMANGLE(b) ) ); -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the double-precision floating-point value `a' is less than -the corresponding value `b', and 0 otherwise. The comparison is performed -according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -flag float64_lt( float64 a, float64 b ) -{ - flag aSign, bSign; - - if ( ( ( extractFloat64Exp( a ) == 0x7FF ) - && ( extractFloat64Frac0( a ) | extractFloat64Frac1( a ) ) ) - || ( ( extractFloat64Exp( b ) == 0x7FF ) - && ( extractFloat64Frac0( b ) | extractFloat64Frac1( b ) ) ) - ) { - float_raise( float_flag_invalid ); - return 0; - } - aSign = extractFloat64Sign( a ); - bSign = extractFloat64Sign( b ); - if ( aSign != bSign ) - return aSign && - ( (bits64) ( ( FLOAT64_DEMANGLE(a) | FLOAT64_DEMANGLE(b) )<<1 ) != - 0 ); - return ( a != b ) && - ( aSign ^ ( FLOAT64_DEMANGLE(a) < FLOAT64_DEMANGLE(b) ) ); - -} - -#ifndef SOFTFLOAT_FOR_GCC -/* -------------------------------------------------------------------------------- -Returns 1 if the double-precision floating-point value `a' is equal to -the corresponding value `b', and 0 otherwise. The invalid exception is -raised if either operand is a NaN. Otherwise, the comparison is performed -according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -flag float64_eq_signaling( float64 a, float64 b ) -{ - - if ( ( ( extractFloat64Exp( a ) == 0x7FF ) - && ( extractFloat64Frac0( a ) | extractFloat64Frac1( a ) ) ) - || ( ( extractFloat64Exp( b ) == 0x7FF ) - && ( extractFloat64Frac0( b ) | extractFloat64Frac1( b ) ) ) - ) { - float_raise( float_flag_invalid ); - return 0; - } - return ( a == b ) || ( (bits64) ( ( a | b )<<1 ) == 0 ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the double-precision floating-point value `a' is less than or -equal to the corresponding value `b', and 0 otherwise. Quiet NaNs do not -cause an exception. Otherwise, the comparison is performed according to the -IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -flag float64_le_quiet( float64 a, float64 b ) -{ - flag aSign, bSign; - - if ( ( ( extractFloat64Exp( a ) == 0x7FF ) - && ( extractFloat64Frac0( a ) | extractFloat64Frac1( a ) ) ) - || ( ( extractFloat64Exp( b ) == 0x7FF ) - && ( extractFloat64Frac0( b ) | extractFloat64Frac1( b ) ) ) - ) { - if ( float64_is_signaling_nan( a ) || float64_is_signaling_nan( b ) ) { - float_raise( float_flag_invalid ); - } - return 0; - } - aSign = extractFloat64Sign( a ); - bSign = extractFloat64Sign( b ); - if ( aSign != bSign ) return aSign || ( (bits64) ( ( a | b )<<1 ) == 0 ); - return ( a == b ) || ( aSign ^ ( a < b ) ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the double-precision floating-point value `a' is less than -the corresponding value `b', and 0 otherwise. Quiet NaNs do not cause an -exception. Otherwise, the comparison is performed according to the IEC/IEEE -Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -flag float64_lt_quiet( float64 a, float64 b ) -{ - flag aSign, bSign; - - if ( ( ( extractFloat64Exp( a ) == 0x7FF ) - && ( extractFloat64Frac0( a ) | extractFloat64Frac1( a ) ) ) - || ( ( extractFloat64Exp( b ) == 0x7FF ) - && ( extractFloat64Frac0( b ) | extractFloat64Frac1( b ) ) ) - ) { - if ( float64_is_signaling_nan( a ) || float64_is_signaling_nan( b ) ) { - float_raise( float_flag_invalid ); - } - return 0; - } - aSign = extractFloat64Sign( a ); - bSign = extractFloat64Sign( b ); - if ( aSign != bSign ) return aSign && ( (bits64) ( ( a | b )<<1 ) != 0 ); - return ( a != b ) && ( aSign ^ ( a < b ) ); - -} - -#endif diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/bits64/softfloat-macros b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/bits64/softfloat-macros deleted file mode 100644 index 229976cfe6ba..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/bits64/softfloat-macros +++ /dev/null @@ -1,745 +0,0 @@ -/* NetBSD: softfloat-macros,v 1.1 2002/05/21 23:51:08 bjh21 Exp */ - -/* -=============================================================================== - -This C source fragment is part of the SoftFloat IEC/IEEE Floating-point -Arithmetic Package, Release 2a. - -Written by John R. Hauser. This work was made possible in part by the -International Computer Science Institute, located at Suite 600, 1947 Center -Street, Berkeley, California 94704. Funding was partially provided by the -National Science Foundation under grant MIP-9311980. The original version -of this code was written as part of a project to build a fixed-point vector -processor in collaboration with the University of California at Berkeley, -overseen by Profs. Nelson Morgan and John Wawrzynek. More information -is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ -arithmetic/SoftFloat.html'. - -THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. - -Derivative works are acceptable, even for commercial purposes, so long as -(1) they include prominent notice that the work is derivative, and (2) they -include prominent notice akin to these four paragraphs for those parts of -this code that are retained. - -=============================================================================== -*/ - -/* -------------------------------------------------------------------------------- -Shifts `a' right by the number of bits given in `count'. If any nonzero -bits are shifted off, they are ``jammed'' into the least significant bit of -the result by setting the least significant bit to 1. The value of `count' -can be arbitrarily large; in particular, if `count' is greater than 32, the -result will be either 0 or 1, depending on whether `a' is zero or nonzero. -The result is stored in the location pointed to by `zPtr'. -------------------------------------------------------------------------------- -*/ -INLINE void shift32RightJamming( bits32 a, int16 count, bits32 *zPtr ) -{ - bits32 z; - - if ( count == 0 ) { - z = a; - } - else if ( count < 32 ) { - z = ( a>>count ) | ( ( a<<( ( - count ) & 31 ) ) != 0 ); - } - else { - z = ( a != 0 ); - } - *zPtr = z; - -} - -/* -------------------------------------------------------------------------------- -Shifts `a' right by the number of bits given in `count'. If any nonzero -bits are shifted off, they are ``jammed'' into the least significant bit of -the result by setting the least significant bit to 1. The value of `count' -can be arbitrarily large; in particular, if `count' is greater than 64, the -result will be either 0 or 1, depending on whether `a' is zero or nonzero. -The result is stored in the location pointed to by `zPtr'. -------------------------------------------------------------------------------- -*/ -INLINE void shift64RightJamming( bits64 a, int16 count, bits64 *zPtr ) -{ - bits64 z; - - if ( count == 0 ) { - z = a; - } - else if ( count < 64 ) { - z = ( a>>count ) | ( ( a<<( ( - count ) & 63 ) ) != 0 ); - } - else { - z = ( a != 0 ); - } - *zPtr = z; - -} - -/* -------------------------------------------------------------------------------- -Shifts the 128-bit value formed by concatenating `a0' and `a1' right by 64 -_plus_ the number of bits given in `count'. The shifted result is at most -64 nonzero bits; this is stored at the location pointed to by `z0Ptr'. The -bits shifted off form a second 64-bit result as follows: The _last_ bit -shifted off is the most-significant bit of the extra result, and the other -63 bits of the extra result are all zero if and only if _all_but_the_last_ -bits shifted off were all zero. This extra result is stored in the location -pointed to by `z1Ptr'. The value of `count' can be arbitrarily large. - (This routine makes more sense if `a0' and `a1' are considered to form a -fixed-point value with binary point between `a0' and `a1'. This fixed-point -value is shifted right by the number of bits given in `count', and the -integer part of the result is returned at the location pointed to by -`z0Ptr'. The fractional part of the result may be slightly corrupted as -described above, and is returned at the location pointed to by `z1Ptr'.) -------------------------------------------------------------------------------- -*/ -INLINE void - shift64ExtraRightJamming( - bits64 a0, bits64 a1, int16 count, bits64 *z0Ptr, bits64 *z1Ptr ) -{ - bits64 z0, z1; - int8 negCount = ( - count ) & 63; - - if ( count == 0 ) { - z1 = a1; - z0 = a0; - } - else if ( count < 64 ) { - z1 = ( a0<>count; - } - else { - if ( count == 64 ) { - z1 = a0 | ( a1 != 0 ); - } - else { - z1 = ( ( a0 | a1 ) != 0 ); - } - z0 = 0; - } - *z1Ptr = z1; - *z0Ptr = z0; - -} - -/* -------------------------------------------------------------------------------- -Shifts the 128-bit value formed by concatenating `a0' and `a1' right by the -number of bits given in `count'. Any bits shifted off are lost. The value -of `count' can be arbitrarily large; in particular, if `count' is greater -than 128, the result will be 0. The result is broken into two 64-bit pieces -which are stored at the locations pointed to by `z0Ptr' and `z1Ptr'. -------------------------------------------------------------------------------- -*/ -INLINE void - shift128Right( - bits64 a0, bits64 a1, int16 count, bits64 *z0Ptr, bits64 *z1Ptr ) -{ - bits64 z0, z1; - int8 negCount = ( - count ) & 63; - - if ( count == 0 ) { - z1 = a1; - z0 = a0; - } - else if ( count < 64 ) { - z1 = ( a0<>count ); - z0 = a0>>count; - } - else { - z1 = ( count < 64 ) ? ( a0>>( count & 63 ) ) : 0; - z0 = 0; - } - *z1Ptr = z1; - *z0Ptr = z0; - -} - -/* -------------------------------------------------------------------------------- -Shifts the 128-bit value formed by concatenating `a0' and `a1' right by the -number of bits given in `count'. If any nonzero bits are shifted off, they -are ``jammed'' into the least significant bit of the result by setting the -least significant bit to 1. The value of `count' can be arbitrarily large; -in particular, if `count' is greater than 128, the result will be either -0 or 1, depending on whether the concatenation of `a0' and `a1' is zero or -nonzero. The result is broken into two 64-bit pieces which are stored at -the locations pointed to by `z0Ptr' and `z1Ptr'. -------------------------------------------------------------------------------- -*/ -INLINE void - shift128RightJamming( - bits64 a0, bits64 a1, int16 count, bits64 *z0Ptr, bits64 *z1Ptr ) -{ - bits64 z0, z1; - int8 negCount = ( - count ) & 63; - - if ( count == 0 ) { - z1 = a1; - z0 = a0; - } - else if ( count < 64 ) { - z1 = ( a0<>count ) | ( ( a1<>count; - } - else { - if ( count == 64 ) { - z1 = a0 | ( a1 != 0 ); - } - else if ( count < 128 ) { - z1 = ( a0>>( count & 63 ) ) | ( ( ( a0<>count ); - z0 = a0>>count; - } - else { - if ( count == 64 ) { - z2 = a1; - z1 = a0; - } - else { - a2 |= a1; - if ( count < 128 ) { - z2 = a0<>( count & 63 ); - } - else { - z2 = ( count == 128 ) ? a0 : ( a0 != 0 ); - z1 = 0; - } - } - z0 = 0; - } - z2 |= ( a2 != 0 ); - } - *z2Ptr = z2; - *z1Ptr = z1; - *z0Ptr = z0; - -} - -/* -------------------------------------------------------------------------------- -Shifts the 128-bit value formed by concatenating `a0' and `a1' left by the -number of bits given in `count'. Any bits shifted off are lost. The value -of `count' must be less than 64. The result is broken into two 64-bit -pieces which are stored at the locations pointed to by `z0Ptr' and `z1Ptr'. -------------------------------------------------------------------------------- -*/ -INLINE void - shortShift128Left( - bits64 a0, bits64 a1, int16 count, bits64 *z0Ptr, bits64 *z1Ptr ) -{ - - *z1Ptr = a1<>( ( - count ) & 63 ) ); - -} - -/* -------------------------------------------------------------------------------- -Shifts the 192-bit value formed by concatenating `a0', `a1', and `a2' left -by the number of bits given in `count'. Any bits shifted off are lost. -The value of `count' must be less than 64. The result is broken into three -64-bit pieces which are stored at the locations pointed to by `z0Ptr', -`z1Ptr', and `z2Ptr'. -------------------------------------------------------------------------------- -*/ -INLINE void - shortShift192Left( - bits64 a0, - bits64 a1, - bits64 a2, - int16 count, - bits64 *z0Ptr, - bits64 *z1Ptr, - bits64 *z2Ptr - ) -{ - bits64 z0, z1, z2; - int8 negCount; - - z2 = a2<>negCount; - z0 |= a1>>negCount; - } - *z2Ptr = z2; - *z1Ptr = z1; - *z0Ptr = z0; - -} - -/* -------------------------------------------------------------------------------- -Adds the 128-bit value formed by concatenating `a0' and `a1' to the 128-bit -value formed by concatenating `b0' and `b1'. Addition is modulo 2^128, so -any carry out is lost. The result is broken into two 64-bit pieces which -are stored at the locations pointed to by `z0Ptr' and `z1Ptr'. -------------------------------------------------------------------------------- -*/ -INLINE void - add128( - bits64 a0, bits64 a1, bits64 b0, bits64 b1, bits64 *z0Ptr, bits64 *z1Ptr ) -{ - bits64 z1; - - z1 = a1 + b1; - *z1Ptr = z1; - *z0Ptr = a0 + b0 + ( z1 < a1 ); - -} - -/* -------------------------------------------------------------------------------- -Adds the 192-bit value formed by concatenating `a0', `a1', and `a2' to the -192-bit value formed by concatenating `b0', `b1', and `b2'. Addition is -modulo 2^192, so any carry out is lost. The result is broken into three -64-bit pieces which are stored at the locations pointed to by `z0Ptr', -`z1Ptr', and `z2Ptr'. -------------------------------------------------------------------------------- -*/ -INLINE void - add192( - bits64 a0, - bits64 a1, - bits64 a2, - bits64 b0, - bits64 b1, - bits64 b2, - bits64 *z0Ptr, - bits64 *z1Ptr, - bits64 *z2Ptr - ) -{ - bits64 z0, z1, z2; - int8 carry0, carry1; - - z2 = a2 + b2; - carry1 = ( z2 < a2 ); - z1 = a1 + b1; - carry0 = ( z1 < a1 ); - z0 = a0 + b0; - z1 += carry1; - z0 += ( z1 < carry1 ); - z0 += carry0; - *z2Ptr = z2; - *z1Ptr = z1; - *z0Ptr = z0; - -} - -/* -------------------------------------------------------------------------------- -Subtracts the 128-bit value formed by concatenating `b0' and `b1' from the -128-bit value formed by concatenating `a0' and `a1'. Subtraction is modulo -2^128, so any borrow out (carry out) is lost. The result is broken into two -64-bit pieces which are stored at the locations pointed to by `z0Ptr' and -`z1Ptr'. -------------------------------------------------------------------------------- -*/ -INLINE void - sub128( - bits64 a0, bits64 a1, bits64 b0, bits64 b1, bits64 *z0Ptr, bits64 *z1Ptr ) -{ - - *z1Ptr = a1 - b1; - *z0Ptr = a0 - b0 - ( a1 < b1 ); - -} - -/* -------------------------------------------------------------------------------- -Subtracts the 192-bit value formed by concatenating `b0', `b1', and `b2' -from the 192-bit value formed by concatenating `a0', `a1', and `a2'. -Subtraction is modulo 2^192, so any borrow out (carry out) is lost. The -result is broken into three 64-bit pieces which are stored at the locations -pointed to by `z0Ptr', `z1Ptr', and `z2Ptr'. -------------------------------------------------------------------------------- -*/ -INLINE void - sub192( - bits64 a0, - bits64 a1, - bits64 a2, - bits64 b0, - bits64 b1, - bits64 b2, - bits64 *z0Ptr, - bits64 *z1Ptr, - bits64 *z2Ptr - ) -{ - bits64 z0, z1, z2; - int8 borrow0, borrow1; - - z2 = a2 - b2; - borrow1 = ( a2 < b2 ); - z1 = a1 - b1; - borrow0 = ( a1 < b1 ); - z0 = a0 - b0; - z0 -= ( z1 < borrow1 ); - z1 -= borrow1; - z0 -= borrow0; - *z2Ptr = z2; - *z1Ptr = z1; - *z0Ptr = z0; - -} - -/* -------------------------------------------------------------------------------- -Multiplies `a' by `b' to obtain a 128-bit product. The product is broken -into two 64-bit pieces which are stored at the locations pointed to by -`z0Ptr' and `z1Ptr'. -------------------------------------------------------------------------------- -*/ -INLINE void mul64To128( bits64 a, bits64 b, bits64 *z0Ptr, bits64 *z1Ptr ) -{ - bits32 aHigh, aLow, bHigh, bLow; - bits64 z0, zMiddleA, zMiddleB, z1; - - aLow = a; - aHigh = a>>32; - bLow = b; - bHigh = b>>32; - z1 = ( (bits64) aLow ) * bLow; - zMiddleA = ( (bits64) aLow ) * bHigh; - zMiddleB = ( (bits64) aHigh ) * bLow; - z0 = ( (bits64) aHigh ) * bHigh; - zMiddleA += zMiddleB; - z0 += ( ( (bits64) ( zMiddleA < zMiddleB ) )<<32 ) + ( zMiddleA>>32 ); - zMiddleA <<= 32; - z1 += zMiddleA; - z0 += ( z1 < zMiddleA ); - *z1Ptr = z1; - *z0Ptr = z0; - -} - -/* -------------------------------------------------------------------------------- -Multiplies the 128-bit value formed by concatenating `a0' and `a1' by -`b' to obtain a 192-bit product. The product is broken into three 64-bit -pieces which are stored at the locations pointed to by `z0Ptr', `z1Ptr', and -`z2Ptr'. -------------------------------------------------------------------------------- -*/ -INLINE void - mul128By64To192( - bits64 a0, - bits64 a1, - bits64 b, - bits64 *z0Ptr, - bits64 *z1Ptr, - bits64 *z2Ptr - ) -{ - bits64 z0, z1, z2, more1; - - mul64To128( a1, b, &z1, &z2 ); - mul64To128( a0, b, &z0, &more1 ); - add128( z0, more1, 0, z1, &z0, &z1 ); - *z2Ptr = z2; - *z1Ptr = z1; - *z0Ptr = z0; - -} - -/* -------------------------------------------------------------------------------- -Multiplies the 128-bit value formed by concatenating `a0' and `a1' to the -128-bit value formed by concatenating `b0' and `b1' to obtain a 256-bit -product. The product is broken into four 64-bit pieces which are stored at -the locations pointed to by `z0Ptr', `z1Ptr', `z2Ptr', and `z3Ptr'. -------------------------------------------------------------------------------- -*/ -INLINE void - mul128To256( - bits64 a0, - bits64 a1, - bits64 b0, - bits64 b1, - bits64 *z0Ptr, - bits64 *z1Ptr, - bits64 *z2Ptr, - bits64 *z3Ptr - ) -{ - bits64 z0, z1, z2, z3; - bits64 more1, more2; - - mul64To128( a1, b1, &z2, &z3 ); - mul64To128( a1, b0, &z1, &more2 ); - add128( z1, more2, 0, z2, &z1, &z2 ); - mul64To128( a0, b0, &z0, &more1 ); - add128( z0, more1, 0, z1, &z0, &z1 ); - mul64To128( a0, b1, &more1, &more2 ); - add128( more1, more2, 0, z2, &more1, &z2 ); - add128( z0, z1, 0, more1, &z0, &z1 ); - *z3Ptr = z3; - *z2Ptr = z2; - *z1Ptr = z1; - *z0Ptr = z0; - -} - -/* -------------------------------------------------------------------------------- -Returns an approximation to the 64-bit integer quotient obtained by dividing -`b' into the 128-bit value formed by concatenating `a0' and `a1'. The -divisor `b' must be at least 2^63. If q is the exact quotient truncated -toward zero, the approximation returned lies between q and q + 2 inclusive. -If the exact quotient q is larger than 64 bits, the maximum positive 64-bit -unsigned integer is returned. -------------------------------------------------------------------------------- -*/ -static bits64 estimateDiv128To64( bits64 a0, bits64 a1, bits64 b ) -{ - bits64 b0, b1; - bits64 rem0, rem1, term0, term1; - bits64 z; - - if ( b <= a0 ) return LIT64( 0xFFFFFFFFFFFFFFFF ); - b0 = b>>32; - z = ( b0<<32 <= a0 ) ? LIT64( 0xFFFFFFFF00000000 ) : ( a0 / b0 )<<32; - mul64To128( b, z, &term0, &term1 ); - sub128( a0, a1, term0, term1, &rem0, &rem1 ); - while ( ( (sbits64) rem0 ) < 0 ) { - z -= LIT64( 0x100000000 ); - b1 = b<<32; - add128( rem0, rem1, b0, b1, &rem0, &rem1 ); - } - rem0 = ( rem0<<32 ) | ( rem1>>32 ); - z |= ( b0<<32 <= rem0 ) ? 0xFFFFFFFF : rem0 / b0; - return z; - -} - -#if !defined(SOFTFLOAT_FOR_GCC) || defined(FLOATX80) || defined(FLOAT128) -/* -------------------------------------------------------------------------------- -Returns an approximation to the square root of the 32-bit significand given -by `a'. Considered as an integer, `a' must be at least 2^31. If bit 0 of -`aExp' (the least significant bit) is 1, the integer returned approximates -2^31*sqrt(`a'/2^31), where `a' is considered an integer. If bit 0 of `aExp' -is 0, the integer returned approximates 2^31*sqrt(`a'/2^30). In either -case, the approximation returned lies strictly within +/-2 of the exact -value. -------------------------------------------------------------------------------- -*/ -static bits32 estimateSqrt32( int16 aExp, bits32 a ) -{ - static const bits16 sqrtOddAdjustments[] = { - 0x0004, 0x0022, 0x005D, 0x00B1, 0x011D, 0x019F, 0x0236, 0x02E0, - 0x039C, 0x0468, 0x0545, 0x0631, 0x072B, 0x0832, 0x0946, 0x0A67 - }; - static const bits16 sqrtEvenAdjustments[] = { - 0x0A2D, 0x08AF, 0x075A, 0x0629, 0x051A, 0x0429, 0x0356, 0x029E, - 0x0200, 0x0179, 0x0109, 0x00AF, 0x0068, 0x0034, 0x0012, 0x0002 - }; - int8 idx; - bits32 z; - - idx = ( a>>27 ) & 15; - if ( aExp & 1 ) { - z = 0x4000 + ( a>>17 ) - sqrtOddAdjustments[ idx ]; - z = ( ( a / z )<<14 ) + ( z<<15 ); - a >>= 1; - } - else { - z = 0x8000 + ( a>>17 ) - sqrtEvenAdjustments[ idx ]; - z = a / z + z; - z = ( 0x20000 <= z ) ? 0xFFFF8000 : ( z<<15 ); - if ( z <= a ) return (bits32) ( ( (sbits32) a )>>1 ); - } - return ( (bits32) ( ( ( (bits64) a )<<31 ) / z ) ) + ( z>>1 ); - -} -#endif - -/* -------------------------------------------------------------------------------- -Returns the number of leading 0 bits before the most-significant 1 bit of -`a'. If `a' is zero, 32 is returned. -------------------------------------------------------------------------------- -*/ -static int8 countLeadingZeros32( bits32 a ) -{ - static const int8 countLeadingZerosHigh[] = { - 8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }; - int8 shiftCount; - - shiftCount = 0; - if ( a < 0x10000 ) { - shiftCount += 16; - a <<= 16; - } - if ( a < 0x1000000 ) { - shiftCount += 8; - a <<= 8; - } - shiftCount += countLeadingZerosHigh[ a>>24 ]; - return shiftCount; - -} - -/* -------------------------------------------------------------------------------- -Returns the number of leading 0 bits before the most-significant 1 bit of -`a'. If `a' is zero, 64 is returned. -------------------------------------------------------------------------------- -*/ -static int8 countLeadingZeros64( bits64 a ) -{ - int8 shiftCount; - - shiftCount = 0; - if ( a < ( (bits64) 1 )<<32 ) { - shiftCount += 32; - } - else { - a >>= 32; - } - shiftCount += countLeadingZeros32( a ); - return shiftCount; - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the 128-bit value formed by concatenating `a0' and `a1' -is equal to the 128-bit value formed by concatenating `b0' and `b1'. -Otherwise, returns 0. -------------------------------------------------------------------------------- -*/ -INLINE flag eq128( bits64 a0, bits64 a1, bits64 b0, bits64 b1 ) -{ - - return ( a0 == b0 ) && ( a1 == b1 ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the 128-bit value formed by concatenating `a0' and `a1' is less -than or equal to the 128-bit value formed by concatenating `b0' and `b1'. -Otherwise, returns 0. -------------------------------------------------------------------------------- -*/ -INLINE flag le128( bits64 a0, bits64 a1, bits64 b0, bits64 b1 ) -{ - - return ( a0 < b0 ) || ( ( a0 == b0 ) && ( a1 <= b1 ) ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the 128-bit value formed by concatenating `a0' and `a1' is less -than the 128-bit value formed by concatenating `b0' and `b1'. Otherwise, -returns 0. -------------------------------------------------------------------------------- -*/ -INLINE flag lt128( bits64 a0, bits64 a1, bits64 b0, bits64 b1 ) -{ - - return ( a0 < b0 ) || ( ( a0 == b0 ) && ( a1 < b1 ) ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the 128-bit value formed by concatenating `a0' and `a1' is -not equal to the 128-bit value formed by concatenating `b0' and `b1'. -Otherwise, returns 0. -------------------------------------------------------------------------------- -*/ -INLINE flag ne128( bits64 a0, bits64 a1, bits64 b0, bits64 b1 ) -{ - - return ( a0 != b0 ) || ( a1 != b1 ); - -} - diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/bits64/softfloat.c b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/bits64/softfloat.c deleted file mode 100644 index 095b4b307455..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/bits64/softfloat.c +++ /dev/null @@ -1,5547 +0,0 @@ -/* NetBSD: softfloat.c,v 1.5 2007/11/08 21:31:04 martin Exp */ - -/* - * This version hacked for use with gcc -msoft-float by bjh21. - * (Mostly a case of #ifdefing out things GCC doesn't need or provides - * itself). - */ - -/* - * Things you may want to define: - * - * SOFTFLOAT_FOR_GCC - build only those functions necessary for GCC (with - * -msoft-float) to work. Include "softfloat-for-gcc.h" to get them - * properly renamed. - */ - -/* -=============================================================================== - -This C source file is part of the SoftFloat IEC/IEEE Floating-point -Arithmetic Package, Release 2a. - -Written by John R. Hauser. This work was made possible in part by the -International Computer Science Institute, located at Suite 600, 1947 Center -Street, Berkeley, California 94704. Funding was partially provided by the -National Science Foundation under grant MIP-9311980. The original version -of this code was written as part of a project to build a fixed-point vector -processor in collaboration with the University of California at Berkeley, -overseen by Profs. Nelson Morgan and John Wawrzynek. More information -is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ -arithmetic/SoftFloat.html'. - -THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. - -Derivative works are acceptable, even for commercial purposes, so long as -(1) they include prominent notice that the work is derivative, and (2) they -include prominent notice akin to these four paragraphs for those parts of -this code that are retained. - -=============================================================================== -*/ - -#ifdef SOFTFLOAT_FOR_GCC -#include "softfloat-for-gcc.h" -#endif - -#include "milieu.h" -#include "softfloat.h" - -/* - * Conversions between floats as stored in memory and floats as - * SoftFloat uses them - */ -#ifndef FLOAT64_DEMANGLE -#define FLOAT64_DEMANGLE(a) (a) -#endif -#ifndef FLOAT64_MANGLE -#define FLOAT64_MANGLE(a) (a) -#endif - -/* -------------------------------------------------------------------------------- -Floating-point rounding mode, extended double-precision rounding precision, -and exception flags. -------------------------------------------------------------------------------- -*/ -fp_rnd float_rounding_mode = float_round_nearest_even; -fp_except float_exception_flags = 0; -#ifdef FLOATX80 -int8 floatx80_rounding_precision = 80; -#endif - -/* -------------------------------------------------------------------------------- -Primitive arithmetic functions, including multi-word arithmetic, and -division and square root approximations. (Can be specialized to target if -desired.) -------------------------------------------------------------------------------- -*/ -#include "softfloat-macros" - -/* -------------------------------------------------------------------------------- -Functions and definitions to determine: (1) whether tininess for underflow -is detected before or after rounding by default, (2) what (if anything) -happens when exceptions are raised, (3) how signaling NaNs are distinguished -from quiet NaNs, (4) the default generated quiet NaNs, and (5) how NaNs -are propagated from function inputs to output. These details are target- -specific. -------------------------------------------------------------------------------- -*/ -#include "softfloat-specialize" - -#if !defined(SOFTFLOAT_FOR_GCC) || defined(FLOATX80) || defined(FLOAT128) -/* -------------------------------------------------------------------------------- -Takes a 64-bit fixed-point value `absZ' with binary point between bits 6 -and 7, and returns the properly rounded 32-bit integer corresponding to the -input. If `zSign' is 1, the input is negated before being converted to an -integer. Bit 63 of `absZ' must be zero. Ordinarily, the fixed-point input -is simply rounded to an integer, with the inexact exception raised if the -input cannot be represented exactly as an integer. However, if the fixed- -point input is too large, the invalid exception is raised and the largest -positive or negative integer is returned. -------------------------------------------------------------------------------- -*/ -static int32 roundAndPackInt32( flag zSign, bits64 absZ ) -{ - int8 roundingMode; - flag roundNearestEven; - int8 roundIncrement, roundBits; - int32 z; - - roundingMode = float_rounding_mode; - roundNearestEven = ( roundingMode == float_round_nearest_even ); - roundIncrement = 0x40; - if ( ! roundNearestEven ) { - if ( roundingMode == float_round_to_zero ) { - roundIncrement = 0; - } - else { - roundIncrement = 0x7F; - if ( zSign ) { - if ( roundingMode == float_round_up ) roundIncrement = 0; - } - else { - if ( roundingMode == float_round_down ) roundIncrement = 0; - } - } - } - roundBits = absZ & 0x7F; - absZ = ( absZ + roundIncrement )>>7; - absZ &= ~ ( ( ( roundBits ^ 0x40 ) == 0 ) & roundNearestEven ); - z = absZ; - if ( zSign ) z = - z; - if ( ( absZ>>32 ) || ( z && ( ( z < 0 ) ^ zSign ) ) ) { - float_raise( float_flag_invalid ); - return zSign ? (sbits32) 0x80000000 : 0x7FFFFFFF; - } - if ( roundBits ) float_exception_flags |= float_flag_inexact; - return z; - -} - -/* -------------------------------------------------------------------------------- -Takes the 128-bit fixed-point value formed by concatenating `absZ0' and -`absZ1', with binary point between bits 63 and 64 (between the input words), -and returns the properly rounded 64-bit integer corresponding to the input. -If `zSign' is 1, the input is negated before being converted to an integer. -Ordinarily, the fixed-point input is simply rounded to an integer, with -the inexact exception raised if the input cannot be represented exactly as -an integer. However, if the fixed-point input is too large, the invalid -exception is raised and the largest positive or negative integer is -returned. -------------------------------------------------------------------------------- -*/ -static int64 roundAndPackInt64( flag zSign, bits64 absZ0, bits64 absZ1 ) -{ - int8 roundingMode; - flag roundNearestEven, increment; - int64 z; - - roundingMode = float_rounding_mode; - roundNearestEven = ( roundingMode == float_round_nearest_even ); - increment = ( (sbits64) absZ1 < 0 ); - if ( ! roundNearestEven ) { - if ( roundingMode == float_round_to_zero ) { - increment = 0; - } - else { - if ( zSign ) { - increment = ( roundingMode == float_round_down ) && absZ1; - } - else { - increment = ( roundingMode == float_round_up ) && absZ1; - } - } - } - if ( increment ) { - ++absZ0; - if ( absZ0 == 0 ) goto overflow; - absZ0 &= ~ ( ( (bits64) ( absZ1<<1 ) == 0 ) & roundNearestEven ); - } - z = absZ0; - if ( zSign ) z = - z; - if ( z && ( ( z < 0 ) ^ zSign ) ) { - overflow: - float_raise( float_flag_invalid ); - return - zSign ? (sbits64) LIT64( 0x8000000000000000 ) - : LIT64( 0x7FFFFFFFFFFFFFFF ); - } - if ( absZ1 ) float_exception_flags |= float_flag_inexact; - return z; - -} -#endif - -/* -------------------------------------------------------------------------------- -Returns the fraction bits of the single-precision floating-point value `a'. -------------------------------------------------------------------------------- -*/ -INLINE bits32 extractFloat32Frac( float32 a ) -{ - - return a & 0x007FFFFF; - -} - -/* -------------------------------------------------------------------------------- -Returns the exponent bits of the single-precision floating-point value `a'. -------------------------------------------------------------------------------- -*/ -INLINE int16 extractFloat32Exp( float32 a ) -{ - - return ( a>>23 ) & 0xFF; - -} - -/* -------------------------------------------------------------------------------- -Returns the sign bit of the single-precision floating-point value `a'. -------------------------------------------------------------------------------- -*/ -INLINE flag extractFloat32Sign( float32 a ) -{ - - return a>>31; - -} - -/* -------------------------------------------------------------------------------- -Normalizes the subnormal single-precision floating-point value represented -by the denormalized significand `aSig'. The normalized exponent and -significand are stored at the locations pointed to by `zExpPtr' and -`zSigPtr', respectively. -------------------------------------------------------------------------------- -*/ -static void - normalizeFloat32Subnormal( bits32 aSig, int16 *zExpPtr, bits32 *zSigPtr ) -{ - int8 shiftCount; - - shiftCount = countLeadingZeros32( aSig ) - 8; - *zSigPtr = aSig<>7; - zSig &= ~ ( ( ( roundBits ^ 0x40 ) == 0 ) & roundNearestEven ); - if ( zSig == 0 ) zExp = 0; - return packFloat32( zSign, zExp, zSig ); - -} - -/* -------------------------------------------------------------------------------- -Takes an abstract floating-point value having sign `zSign', exponent `zExp', -and significand `zSig', and returns the proper single-precision floating- -point value corresponding to the abstract input. This routine is just like -`roundAndPackFloat32' except that `zSig' does not have to be normalized. -Bit 31 of `zSig' must be zero, and `zExp' must be 1 less than the ``true'' -floating-point exponent. -------------------------------------------------------------------------------- -*/ -static float32 - normalizeRoundAndPackFloat32( flag zSign, int16 zExp, bits32 zSig ) -{ - int8 shiftCount; - - shiftCount = countLeadingZeros32( zSig ) - 1; - return roundAndPackFloat32( zSign, zExp - shiftCount, zSig<>52 ) & 0x7FF; - -} - -/* -------------------------------------------------------------------------------- -Returns the sign bit of the double-precision floating-point value `a'. -------------------------------------------------------------------------------- -*/ -INLINE flag extractFloat64Sign( float64 a ) -{ - - return FLOAT64_DEMANGLE(a)>>63; - -} - -/* -------------------------------------------------------------------------------- -Normalizes the subnormal double-precision floating-point value represented -by the denormalized significand `aSig'. The normalized exponent and -significand are stored at the locations pointed to by `zExpPtr' and -`zSigPtr', respectively. -------------------------------------------------------------------------------- -*/ -static void - normalizeFloat64Subnormal( bits64 aSig, int16 *zExpPtr, bits64 *zSigPtr ) -{ - int8 shiftCount; - - shiftCount = countLeadingZeros64( aSig ) - 11; - *zSigPtr = aSig<>10; - zSig &= ~ ( ( ( roundBits ^ 0x200 ) == 0 ) & roundNearestEven ); - if ( zSig == 0 ) zExp = 0; - return packFloat64( zSign, zExp, zSig ); - -} - -/* -------------------------------------------------------------------------------- -Takes an abstract floating-point value having sign `zSign', exponent `zExp', -and significand `zSig', and returns the proper double-precision floating- -point value corresponding to the abstract input. This routine is just like -`roundAndPackFloat64' except that `zSig' does not have to be normalized. -Bit 63 of `zSig' must be zero, and `zExp' must be 1 less than the ``true'' -floating-point exponent. -------------------------------------------------------------------------------- -*/ -static float64 - normalizeRoundAndPackFloat64( flag zSign, int16 zExp, bits64 zSig ) -{ - int8 shiftCount; - - shiftCount = countLeadingZeros64( zSig ) - 1; - return roundAndPackFloat64( zSign, zExp - shiftCount, zSig<>15; - -} - -/* -------------------------------------------------------------------------------- -Normalizes the subnormal extended double-precision floating-point value -represented by the denormalized significand `aSig'. The normalized exponent -and significand are stored at the locations pointed to by `zExpPtr' and -`zSigPtr', respectively. -------------------------------------------------------------------------------- -*/ -static void - normalizeFloatx80Subnormal( bits64 aSig, int32 *zExpPtr, bits64 *zSigPtr ) -{ - int8 shiftCount; - - shiftCount = countLeadingZeros64( aSig ); - *zSigPtr = aSig<>48 ) & 0x7FFF; - -} - -/* -------------------------------------------------------------------------------- -Returns the sign bit of the quadruple-precision floating-point value `a'. -------------------------------------------------------------------------------- -*/ -INLINE flag extractFloat128Sign( float128 a ) -{ - - return a.high>>63; - -} - -/* -------------------------------------------------------------------------------- -Normalizes the subnormal quadruple-precision floating-point value -represented by the denormalized significand formed by the concatenation of -`aSig0' and `aSig1'. The normalized exponent is stored at the location -pointed to by `zExpPtr'. The most significant 49 bits of the normalized -significand are stored at the location pointed to by `zSig0Ptr', and the -least significant 64 bits of the normalized significand are stored at the -location pointed to by `zSig1Ptr'. -------------------------------------------------------------------------------- -*/ -static void - normalizeFloat128Subnormal( - bits64 aSig0, - bits64 aSig1, - int32 *zExpPtr, - bits64 *zSig0Ptr, - bits64 *zSig1Ptr - ) -{ - int8 shiftCount; - - if ( aSig0 == 0 ) { - shiftCount = countLeadingZeros64( aSig1 ) - 15; - if ( shiftCount < 0 ) { - *zSig0Ptr = aSig1>>( - shiftCount ); - *zSig1Ptr = aSig1<<( shiftCount & 63 ); - } - else { - *zSig0Ptr = aSig1<>( - shiftCount ); - if ( (bits32) ( aSig<<( shiftCount & 31 ) ) ) { - float_exception_flags |= float_flag_inexact; - } - if ( aSign ) z = - z; - return z; - -} - -#ifndef SOFTFLOAT_FOR_GCC /* __fix?fdi provided by libgcc2.c */ -/* -------------------------------------------------------------------------------- -Returns the result of converting the single-precision floating-point value -`a' to the 64-bit two's complement integer format. The conversion is -performed according to the IEC/IEEE Standard for Binary Floating-Point -Arithmetic---which means in particular that the conversion is rounded -according to the current rounding mode. If `a' is a NaN, the largest -positive integer is returned. Otherwise, if the conversion overflows, the -largest integer with the same sign as `a' is returned. -------------------------------------------------------------------------------- -*/ -int64 float32_to_int64( float32 a ) -{ - flag aSign; - int16 aExp, shiftCount; - bits32 aSig; - bits64 aSig64, aSigExtra; - - aSig = extractFloat32Frac( a ); - aExp = extractFloat32Exp( a ); - aSign = extractFloat32Sign( a ); - shiftCount = 0xBE - aExp; - if ( shiftCount < 0 ) { - float_raise( float_flag_invalid ); - if ( ! aSign || ( ( aExp == 0xFF ) && aSig ) ) { - return LIT64( 0x7FFFFFFFFFFFFFFF ); - } - return (sbits64) LIT64( 0x8000000000000000 ); - } - if ( aExp ) aSig |= 0x00800000; - aSig64 = aSig; - aSig64 <<= 40; - shift64ExtraRightJamming( aSig64, 0, shiftCount, &aSig64, &aSigExtra ); - return roundAndPackInt64( aSign, aSig64, aSigExtra ); - -} - -/* -------------------------------------------------------------------------------- -Returns the result of converting the single-precision floating-point value -`a' to the 64-bit two's complement integer format. The conversion is -performed according to the IEC/IEEE Standard for Binary Floating-Point -Arithmetic, except that the conversion is always rounded toward zero. If -`a' is a NaN, the largest positive integer is returned. Otherwise, if the -conversion overflows, the largest integer with the same sign as `a' is -returned. -------------------------------------------------------------------------------- -*/ -int64 float32_to_int64_round_to_zero( float32 a ) -{ - flag aSign; - int16 aExp, shiftCount; - bits32 aSig; - bits64 aSig64; - int64 z; - - aSig = extractFloat32Frac( a ); - aExp = extractFloat32Exp( a ); - aSign = extractFloat32Sign( a ); - shiftCount = aExp - 0xBE; - if ( 0 <= shiftCount ) { - if ( a != 0xDF000000 ) { - float_raise( float_flag_invalid ); - if ( ! aSign || ( ( aExp == 0xFF ) && aSig ) ) { - return LIT64( 0x7FFFFFFFFFFFFFFF ); - } - } - return (sbits64) LIT64( 0x8000000000000000 ); - } - else if ( aExp <= 0x7E ) { - if ( aExp | aSig ) float_exception_flags |= float_flag_inexact; - return 0; - } - aSig64 = aSig | 0x00800000; - aSig64 <<= 40; - z = aSig64>>( - shiftCount ); - if ( (bits64) ( aSig64<<( shiftCount & 63 ) ) ) { - float_exception_flags |= float_flag_inexact; - } - if ( aSign ) z = - z; - return z; - -} -#endif /* !SOFTFLOAT_FOR_GCC */ - -/* -------------------------------------------------------------------------------- -Returns the result of converting the single-precision floating-point value -`a' to the double-precision floating-point format. The conversion is -performed according to the IEC/IEEE Standard for Binary Floating-Point -Arithmetic. -------------------------------------------------------------------------------- -*/ -float64 float32_to_float64( float32 a ) -{ - flag aSign; - int16 aExp; - bits32 aSig; - - aSig = extractFloat32Frac( a ); - aExp = extractFloat32Exp( a ); - aSign = extractFloat32Sign( a ); - if ( aExp == 0xFF ) { - if ( aSig ) return commonNaNToFloat64( float32ToCommonNaN( a ) ); - return packFloat64( aSign, 0x7FF, 0 ); - } - if ( aExp == 0 ) { - if ( aSig == 0 ) return packFloat64( aSign, 0, 0 ); - normalizeFloat32Subnormal( aSig, &aExp, &aSig ); - --aExp; - } - return packFloat64( aSign, aExp + 0x380, ( (bits64) aSig )<<29 ); - -} - -#ifdef FLOATX80 - -/* -------------------------------------------------------------------------------- -Returns the result of converting the single-precision floating-point value -`a' to the extended double-precision floating-point format. The conversion -is performed according to the IEC/IEEE Standard for Binary Floating-Point -Arithmetic. -------------------------------------------------------------------------------- -*/ -floatx80 float32_to_floatx80( float32 a ) -{ - flag aSign; - int16 aExp; - bits32 aSig; - - aSig = extractFloat32Frac( a ); - aExp = extractFloat32Exp( a ); - aSign = extractFloat32Sign( a ); - if ( aExp == 0xFF ) { - if ( aSig ) return commonNaNToFloatx80( float32ToCommonNaN( a ) ); - return packFloatx80( aSign, 0x7FFF, LIT64( 0x8000000000000000 ) ); - } - if ( aExp == 0 ) { - if ( aSig == 0 ) return packFloatx80( aSign, 0, 0 ); - normalizeFloat32Subnormal( aSig, &aExp, &aSig ); - } - aSig |= 0x00800000; - return packFloatx80( aSign, aExp + 0x3F80, ( (bits64) aSig )<<40 ); - -} - -#endif - -#ifdef FLOAT128 - -/* -------------------------------------------------------------------------------- -Returns the result of converting the single-precision floating-point value -`a' to the double-precision floating-point format. The conversion is -performed according to the IEC/IEEE Standard for Binary Floating-Point -Arithmetic. -------------------------------------------------------------------------------- -*/ -float128 float32_to_float128( float32 a ) -{ - flag aSign; - int16 aExp; - bits32 aSig; - - aSig = extractFloat32Frac( a ); - aExp = extractFloat32Exp( a ); - aSign = extractFloat32Sign( a ); - if ( aExp == 0xFF ) { - if ( aSig ) return commonNaNToFloat128( float32ToCommonNaN( a ) ); - return packFloat128( aSign, 0x7FFF, 0, 0 ); - } - if ( aExp == 0 ) { - if ( aSig == 0 ) return packFloat128( aSign, 0, 0, 0 ); - normalizeFloat32Subnormal( aSig, &aExp, &aSig ); - --aExp; - } - return packFloat128( aSign, aExp + 0x3F80, ( (bits64) aSig )<<25, 0 ); - -} - -#endif - -#ifndef SOFTFLOAT_FOR_GCC /* Not needed */ -/* -------------------------------------------------------------------------------- -Rounds the single-precision floating-point value `a' to an integer, and -returns the result as a single-precision floating-point value. The -operation is performed according to the IEC/IEEE Standard for Binary -Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float32 float32_round_to_int( float32 a ) -{ - flag aSign; - int16 aExp; - bits32 lastBitMask, roundBitsMask; - int8 roundingMode; - float32 z; - - aExp = extractFloat32Exp( a ); - if ( 0x96 <= aExp ) { - if ( ( aExp == 0xFF ) && extractFloat32Frac( a ) ) { - return propagateFloat32NaN( a, a ); - } - return a; - } - if ( aExp <= 0x7E ) { - if ( (bits32) ( a<<1 ) == 0 ) return a; - float_exception_flags |= float_flag_inexact; - aSign = extractFloat32Sign( a ); - switch ( float_rounding_mode ) { - case float_round_nearest_even: - if ( ( aExp == 0x7E ) && extractFloat32Frac( a ) ) { - return packFloat32( aSign, 0x7F, 0 ); - } - break; - case float_round_to_zero: - break; - case float_round_down: - return aSign ? 0xBF800000 : 0; - case float_round_up: - return aSign ? 0x80000000 : 0x3F800000; - } - return packFloat32( aSign, 0, 0 ); - } - lastBitMask = 1; - lastBitMask <<= 0x96 - aExp; - roundBitsMask = lastBitMask - 1; - z = a; - roundingMode = float_rounding_mode; - if ( roundingMode == float_round_nearest_even ) { - z += lastBitMask>>1; - if ( ( z & roundBitsMask ) == 0 ) z &= ~ lastBitMask; - } - else if ( roundingMode != float_round_to_zero ) { - if ( extractFloat32Sign( z ) ^ ( roundingMode == float_round_up ) ) { - z += roundBitsMask; - } - } - z &= ~ roundBitsMask; - if ( z != a ) float_exception_flags |= float_flag_inexact; - return z; - -} -#endif /* !SOFTFLOAT_FOR_GCC */ - -/* -------------------------------------------------------------------------------- -Returns the result of adding the absolute values of the single-precision -floating-point values `a' and `b'. If `zSign' is 1, the sum is negated -before being returned. `zSign' is ignored if the result is a NaN. -The addition is performed according to the IEC/IEEE Standard for Binary -Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -static float32 addFloat32Sigs( float32 a, float32 b, flag zSign ) -{ - int16 aExp, bExp, zExp; - bits32 aSig, bSig, zSig; - int16 expDiff; - - aSig = extractFloat32Frac( a ); - aExp = extractFloat32Exp( a ); - bSig = extractFloat32Frac( b ); - bExp = extractFloat32Exp( b ); - expDiff = aExp - bExp; - aSig <<= 6; - bSig <<= 6; - if ( 0 < expDiff ) { - if ( aExp == 0xFF ) { - if ( aSig ) return propagateFloat32NaN( a, b ); - return a; - } - if ( bExp == 0 ) { - --expDiff; - } - else { - bSig |= 0x20000000; - } - shift32RightJamming( bSig, expDiff, &bSig ); - zExp = aExp; - } - else if ( expDiff < 0 ) { - if ( bExp == 0xFF ) { - if ( bSig ) return propagateFloat32NaN( a, b ); - return packFloat32( zSign, 0xFF, 0 ); - } - if ( aExp == 0 ) { - ++expDiff; - } - else { - aSig |= 0x20000000; - } - shift32RightJamming( aSig, - expDiff, &aSig ); - zExp = bExp; - } - else { - if ( aExp == 0xFF ) { - if ( aSig | bSig ) return propagateFloat32NaN( a, b ); - return a; - } - if ( aExp == 0 ) return packFloat32( zSign, 0, ( aSig + bSig )>>6 ); - zSig = 0x40000000 + aSig + bSig; - zExp = aExp; - goto roundAndPack; - } - aSig |= 0x20000000; - zSig = ( aSig + bSig )<<1; - --zExp; - if ( (sbits32) zSig < 0 ) { - zSig = aSig + bSig; - ++zExp; - } - roundAndPack: - return roundAndPackFloat32( zSign, zExp, zSig ); - -} - -/* -------------------------------------------------------------------------------- -Returns the result of subtracting the absolute values of the single- -precision floating-point values `a' and `b'. If `zSign' is 1, the -difference is negated before being returned. `zSign' is ignored if the -result is a NaN. The subtraction is performed according to the IEC/IEEE -Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -static float32 subFloat32Sigs( float32 a, float32 b, flag zSign ) -{ - int16 aExp, bExp, zExp; - bits32 aSig, bSig, zSig; - int16 expDiff; - - aSig = extractFloat32Frac( a ); - aExp = extractFloat32Exp( a ); - bSig = extractFloat32Frac( b ); - bExp = extractFloat32Exp( b ); - expDiff = aExp - bExp; - aSig <<= 7; - bSig <<= 7; - if ( 0 < expDiff ) goto aExpBigger; - if ( expDiff < 0 ) goto bExpBigger; - if ( aExp == 0xFF ) { - if ( aSig | bSig ) return propagateFloat32NaN( a, b ); - float_raise( float_flag_invalid ); - return float32_default_nan; - } - if ( aExp == 0 ) { - aExp = 1; - bExp = 1; - } - if ( bSig < aSig ) goto aBigger; - if ( aSig < bSig ) goto bBigger; - return packFloat32( float_rounding_mode == float_round_down, 0, 0 ); - bExpBigger: - if ( bExp == 0xFF ) { - if ( bSig ) return propagateFloat32NaN( a, b ); - return packFloat32( zSign ^ 1, 0xFF, 0 ); - } - if ( aExp == 0 ) { - ++expDiff; - } - else { - aSig |= 0x40000000; - } - shift32RightJamming( aSig, - expDiff, &aSig ); - bSig |= 0x40000000; - bBigger: - zSig = bSig - aSig; - zExp = bExp; - zSign ^= 1; - goto normalizeRoundAndPack; - aExpBigger: - if ( aExp == 0xFF ) { - if ( aSig ) return propagateFloat32NaN( a, b ); - return a; - } - if ( bExp == 0 ) { - --expDiff; - } - else { - bSig |= 0x40000000; - } - shift32RightJamming( bSig, expDiff, &bSig ); - aSig |= 0x40000000; - aBigger: - zSig = aSig - bSig; - zExp = aExp; - normalizeRoundAndPack: - --zExp; - return normalizeRoundAndPackFloat32( zSign, zExp, zSig ); - -} - -/* -------------------------------------------------------------------------------- -Returns the result of adding the single-precision floating-point values `a' -and `b'. The operation is performed according to the IEC/IEEE Standard for -Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float32 float32_add( float32 a, float32 b ) -{ - flag aSign, bSign; - - aSign = extractFloat32Sign( a ); - bSign = extractFloat32Sign( b ); - if ( aSign == bSign ) { - return addFloat32Sigs( a, b, aSign ); - } - else { - return subFloat32Sigs( a, b, aSign ); - } - -} - -/* -------------------------------------------------------------------------------- -Returns the result of subtracting the single-precision floating-point values -`a' and `b'. The operation is performed according to the IEC/IEEE Standard -for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float32 float32_sub( float32 a, float32 b ) -{ - flag aSign, bSign; - - aSign = extractFloat32Sign( a ); - bSign = extractFloat32Sign( b ); - if ( aSign == bSign ) { - return subFloat32Sigs( a, b, aSign ); - } - else { - return addFloat32Sigs( a, b, aSign ); - } - -} - -/* -------------------------------------------------------------------------------- -Returns the result of multiplying the single-precision floating-point values -`a' and `b'. The operation is performed according to the IEC/IEEE Standard -for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float32 float32_mul( float32 a, float32 b ) -{ - flag aSign, bSign, zSign; - int16 aExp, bExp, zExp; - bits32 aSig, bSig; - bits64 zSig64; - bits32 zSig; - - aSig = extractFloat32Frac( a ); - aExp = extractFloat32Exp( a ); - aSign = extractFloat32Sign( a ); - bSig = extractFloat32Frac( b ); - bExp = extractFloat32Exp( b ); - bSign = extractFloat32Sign( b ); - zSign = aSign ^ bSign; - if ( aExp == 0xFF ) { - if ( aSig || ( ( bExp == 0xFF ) && bSig ) ) { - return propagateFloat32NaN( a, b ); - } - if ( ( bExp | bSig ) == 0 ) { - float_raise( float_flag_invalid ); - return float32_default_nan; - } - return packFloat32( zSign, 0xFF, 0 ); - } - if ( bExp == 0xFF ) { - if ( bSig ) return propagateFloat32NaN( a, b ); - if ( ( aExp | aSig ) == 0 ) { - float_raise( float_flag_invalid ); - return float32_default_nan; - } - return packFloat32( zSign, 0xFF, 0 ); - } - if ( aExp == 0 ) { - if ( aSig == 0 ) return packFloat32( zSign, 0, 0 ); - normalizeFloat32Subnormal( aSig, &aExp, &aSig ); - } - if ( bExp == 0 ) { - if ( bSig == 0 ) return packFloat32( zSign, 0, 0 ); - normalizeFloat32Subnormal( bSig, &bExp, &bSig ); - } - zExp = aExp + bExp - 0x7F; - aSig = ( aSig | 0x00800000 )<<7; - bSig = ( bSig | 0x00800000 )<<8; - shift64RightJamming( ( (bits64) aSig ) * bSig, 32, &zSig64 ); - zSig = zSig64; - if ( 0 <= (sbits32) ( zSig<<1 ) ) { - zSig <<= 1; - --zExp; - } - return roundAndPackFloat32( zSign, zExp, zSig ); - -} - -/* -------------------------------------------------------------------------------- -Returns the result of dividing the single-precision floating-point value `a' -by the corresponding value `b'. The operation is performed according to the -IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float32 float32_div( float32 a, float32 b ) -{ - flag aSign, bSign, zSign; - int16 aExp, bExp, zExp; - bits32 aSig, bSig, zSig; - - aSig = extractFloat32Frac( a ); - aExp = extractFloat32Exp( a ); - aSign = extractFloat32Sign( a ); - bSig = extractFloat32Frac( b ); - bExp = extractFloat32Exp( b ); - bSign = extractFloat32Sign( b ); - zSign = aSign ^ bSign; - if ( aExp == 0xFF ) { - if ( aSig ) return propagateFloat32NaN( a, b ); - if ( bExp == 0xFF ) { - if ( bSig ) return propagateFloat32NaN( a, b ); - float_raise( float_flag_invalid ); - return float32_default_nan; - } - return packFloat32( zSign, 0xFF, 0 ); - } - if ( bExp == 0xFF ) { - if ( bSig ) return propagateFloat32NaN( a, b ); - return packFloat32( zSign, 0, 0 ); - } - if ( bExp == 0 ) { - if ( bSig == 0 ) { - if ( ( aExp | aSig ) == 0 ) { - float_raise( float_flag_invalid ); - return float32_default_nan; - } - float_raise( float_flag_divbyzero ); - return packFloat32( zSign, 0xFF, 0 ); - } - normalizeFloat32Subnormal( bSig, &bExp, &bSig ); - } - if ( aExp == 0 ) { - if ( aSig == 0 ) return packFloat32( zSign, 0, 0 ); - normalizeFloat32Subnormal( aSig, &aExp, &aSig ); - } - zExp = aExp - bExp + 0x7D; - aSig = ( aSig | 0x00800000 )<<7; - bSig = ( bSig | 0x00800000 )<<8; - if ( bSig <= ( aSig + aSig ) ) { - aSig >>= 1; - ++zExp; - } - zSig = ( ( (bits64) aSig )<<32 ) / bSig; - if ( ( zSig & 0x3F ) == 0 ) { - zSig |= ( (bits64) bSig * zSig != ( (bits64) aSig )<<32 ); - } - return roundAndPackFloat32( zSign, zExp, zSig ); - -} - -#ifndef SOFTFLOAT_FOR_GCC /* Not needed */ -/* -------------------------------------------------------------------------------- -Returns the remainder of the single-precision floating-point value `a' -with respect to the corresponding value `b'. The operation is performed -according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float32 float32_rem( float32 a, float32 b ) -{ - flag aSign, bSign, zSign; - int16 aExp, bExp, expDiff; - bits32 aSig, bSig; - bits32 q; - bits64 aSig64, bSig64, q64; - bits32 alternateASig; - sbits32 sigMean; - - aSig = extractFloat32Frac( a ); - aExp = extractFloat32Exp( a ); - aSign = extractFloat32Sign( a ); - bSig = extractFloat32Frac( b ); - bExp = extractFloat32Exp( b ); - bSign = extractFloat32Sign( b ); - if ( aExp == 0xFF ) { - if ( aSig || ( ( bExp == 0xFF ) && bSig ) ) { - return propagateFloat32NaN( a, b ); - } - float_raise( float_flag_invalid ); - return float32_default_nan; - } - if ( bExp == 0xFF ) { - if ( bSig ) return propagateFloat32NaN( a, b ); - return a; - } - if ( bExp == 0 ) { - if ( bSig == 0 ) { - float_raise( float_flag_invalid ); - return float32_default_nan; - } - normalizeFloat32Subnormal( bSig, &bExp, &bSig ); - } - if ( aExp == 0 ) { - if ( aSig == 0 ) return a; - normalizeFloat32Subnormal( aSig, &aExp, &aSig ); - } - expDiff = aExp - bExp; - aSig |= 0x00800000; - bSig |= 0x00800000; - if ( expDiff < 32 ) { - aSig <<= 8; - bSig <<= 8; - if ( expDiff < 0 ) { - if ( expDiff < -1 ) return a; - aSig >>= 1; - } - q = ( bSig <= aSig ); - if ( q ) aSig -= bSig; - if ( 0 < expDiff ) { - q = ( ( (bits64) aSig )<<32 ) / bSig; - q >>= 32 - expDiff; - bSig >>= 2; - aSig = ( ( aSig>>1 )<<( expDiff - 1 ) ) - bSig * q; - } - else { - aSig >>= 2; - bSig >>= 2; - } - } - else { - if ( bSig <= aSig ) aSig -= bSig; - aSig64 = ( (bits64) aSig )<<40; - bSig64 = ( (bits64) bSig )<<40; - expDiff -= 64; - while ( 0 < expDiff ) { - q64 = estimateDiv128To64( aSig64, 0, bSig64 ); - q64 = ( 2 < q64 ) ? q64 - 2 : 0; - aSig64 = - ( ( bSig * q64 )<<38 ); - expDiff -= 62; - } - expDiff += 64; - q64 = estimateDiv128To64( aSig64, 0, bSig64 ); - q64 = ( 2 < q64 ) ? q64 - 2 : 0; - q = q64>>( 64 - expDiff ); - bSig <<= 6; - aSig = ( ( aSig64>>33 )<<( expDiff - 1 ) ) - bSig * q; - } - do { - alternateASig = aSig; - ++q; - aSig -= bSig; - } while ( 0 <= (sbits32) aSig ); - sigMean = aSig + alternateASig; - if ( ( sigMean < 0 ) || ( ( sigMean == 0 ) && ( q & 1 ) ) ) { - aSig = alternateASig; - } - zSign = ( (sbits32) aSig < 0 ); - if ( zSign ) aSig = - aSig; - return normalizeRoundAndPackFloat32( aSign ^ zSign, bExp, aSig ); - -} -#endif /* !SOFTFLOAT_FOR_GCC */ - -#ifndef SOFTFLOAT_FOR_GCC /* Not needed */ -/* -------------------------------------------------------------------------------- -Returns the square root of the single-precision floating-point value `a'. -The operation is performed according to the IEC/IEEE Standard for Binary -Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float32 float32_sqrt( float32 a ) -{ - flag aSign; - int16 aExp, zExp; - bits32 aSig, zSig; - bits64 rem, term; - - aSig = extractFloat32Frac( a ); - aExp = extractFloat32Exp( a ); - aSign = extractFloat32Sign( a ); - if ( aExp == 0xFF ) { - if ( aSig ) return propagateFloat32NaN( a, 0 ); - if ( ! aSign ) return a; - float_raise( float_flag_invalid ); - return float32_default_nan; - } - if ( aSign ) { - if ( ( aExp | aSig ) == 0 ) return a; - float_raise( float_flag_invalid ); - return float32_default_nan; - } - if ( aExp == 0 ) { - if ( aSig == 0 ) return 0; - normalizeFloat32Subnormal( aSig, &aExp, &aSig ); - } - zExp = ( ( aExp - 0x7F )>>1 ) + 0x7E; - aSig = ( aSig | 0x00800000 )<<8; - zSig = estimateSqrt32( aExp, aSig ) + 2; - if ( ( zSig & 0x7F ) <= 5 ) { - if ( zSig < 2 ) { - zSig = 0x7FFFFFFF; - goto roundAndPack; - } - aSig >>= aExp & 1; - term = ( (bits64) zSig ) * zSig; - rem = ( ( (bits64) aSig )<<32 ) - term; - while ( (sbits64) rem < 0 ) { - --zSig; - rem += ( ( (bits64) zSig )<<1 ) | 1; - } - zSig |= ( rem != 0 ); - } - shift32RightJamming( zSig, 1, &zSig ); - roundAndPack: - return roundAndPackFloat32( 0, zExp, zSig ); - -} -#endif /* !SOFTFLOAT_FOR_GCC */ - -/* -------------------------------------------------------------------------------- -Returns 1 if the single-precision floating-point value `a' is equal to -the corresponding value `b', and 0 otherwise. The comparison is performed -according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -flag float32_eq( float32 a, float32 b ) -{ - - if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) ) - || ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) ) - ) { - if ( float32_is_signaling_nan( a ) || float32_is_signaling_nan( b ) ) { - float_raise( float_flag_invalid ); - } - return 0; - } - return ( a == b ) || ( (bits32) ( ( a | b )<<1 ) == 0 ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the single-precision floating-point value `a' is less than -or equal to the corresponding value `b', and 0 otherwise. The comparison -is performed according to the IEC/IEEE Standard for Binary Floating-Point -Arithmetic. -------------------------------------------------------------------------------- -*/ -flag float32_le( float32 a, float32 b ) -{ - flag aSign, bSign; - - if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) ) - || ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) ) - ) { - float_raise( float_flag_invalid ); - return 0; - } - aSign = extractFloat32Sign( a ); - bSign = extractFloat32Sign( b ); - if ( aSign != bSign ) return aSign || ( (bits32) ( ( a | b )<<1 ) == 0 ); - return ( a == b ) || ( aSign ^ ( a < b ) ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the single-precision floating-point value `a' is less than -the corresponding value `b', and 0 otherwise. The comparison is performed -according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -flag float32_lt( float32 a, float32 b ) -{ - flag aSign, bSign; - - if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) ) - || ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) ) - ) { - float_raise( float_flag_invalid ); - return 0; - } - aSign = extractFloat32Sign( a ); - bSign = extractFloat32Sign( b ); - if ( aSign != bSign ) return aSign && ( (bits32) ( ( a | b )<<1 ) != 0 ); - return ( a != b ) && ( aSign ^ ( a < b ) ); - -} - -#ifndef SOFTFLOAT_FOR_GCC /* Not needed */ -/* -------------------------------------------------------------------------------- -Returns 1 if the single-precision floating-point value `a' is equal to -the corresponding value `b', and 0 otherwise. The invalid exception is -raised if either operand is a NaN. Otherwise, the comparison is performed -according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -flag float32_eq_signaling( float32 a, float32 b ) -{ - - if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) ) - || ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) ) - ) { - float_raise( float_flag_invalid ); - return 0; - } - return ( a == b ) || ( (bits32) ( ( a | b )<<1 ) == 0 ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the single-precision floating-point value `a' is less than or -equal to the corresponding value `b', and 0 otherwise. Quiet NaNs do not -cause an exception. Otherwise, the comparison is performed according to the -IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -flag float32_le_quiet( float32 a, float32 b ) -{ - flag aSign, bSign; - - if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) ) - || ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) ) - ) { - if ( float32_is_signaling_nan( a ) || float32_is_signaling_nan( b ) ) { - float_raise( float_flag_invalid ); - } - return 0; - } - aSign = extractFloat32Sign( a ); - bSign = extractFloat32Sign( b ); - if ( aSign != bSign ) return aSign || ( (bits32) ( ( a | b )<<1 ) == 0 ); - return ( a == b ) || ( aSign ^ ( a < b ) ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the single-precision floating-point value `a' is less than -the corresponding value `b', and 0 otherwise. Quiet NaNs do not cause an -exception. Otherwise, the comparison is performed according to the IEC/IEEE -Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -flag float32_lt_quiet( float32 a, float32 b ) -{ - flag aSign, bSign; - - if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) ) - || ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) ) - ) { - if ( float32_is_signaling_nan( a ) || float32_is_signaling_nan( b ) ) { - float_raise( float_flag_invalid ); - } - return 0; - } - aSign = extractFloat32Sign( a ); - bSign = extractFloat32Sign( b ); - if ( aSign != bSign ) return aSign && ( (bits32) ( ( a | b )<<1 ) != 0 ); - return ( a != b ) && ( aSign ^ ( a < b ) ); - -} -#endif /* !SOFTFLOAT_FOR_GCC */ - -#ifndef SOFTFLOAT_FOR_GCC /* Not needed */ -/* -------------------------------------------------------------------------------- -Returns the result of converting the double-precision floating-point value -`a' to the 32-bit two's complement integer format. The conversion is -performed according to the IEC/IEEE Standard for Binary Floating-Point -Arithmetic---which means in particular that the conversion is rounded -according to the current rounding mode. If `a' is a NaN, the largest -positive integer is returned. Otherwise, if the conversion overflows, the -largest integer with the same sign as `a' is returned. -------------------------------------------------------------------------------- -*/ -int32 float64_to_int32( float64 a ) -{ - flag aSign; - int16 aExp, shiftCount; - bits64 aSig; - - aSig = extractFloat64Frac( a ); - aExp = extractFloat64Exp( a ); - aSign = extractFloat64Sign( a ); - if ( ( aExp == 0x7FF ) && aSig ) aSign = 0; - if ( aExp ) aSig |= LIT64( 0x0010000000000000 ); - shiftCount = 0x42C - aExp; - if ( 0 < shiftCount ) shift64RightJamming( aSig, shiftCount, &aSig ); - return roundAndPackInt32( aSign, aSig ); - -} -#endif /* !SOFTFLOAT_FOR_GCC */ - -/* -------------------------------------------------------------------------------- -Returns the result of converting the double-precision floating-point value -`a' to the 32-bit two's complement integer format. The conversion is -performed according to the IEC/IEEE Standard for Binary Floating-Point -Arithmetic, except that the conversion is always rounded toward zero. -If `a' is a NaN, the largest positive integer is returned. Otherwise, if -the conversion overflows, the largest integer with the same sign as `a' is -returned. -------------------------------------------------------------------------------- -*/ -int32 float64_to_int32_round_to_zero( float64 a ) -{ - flag aSign; - int16 aExp, shiftCount; - bits64 aSig, savedASig; - int32 z; - - aSig = extractFloat64Frac( a ); - aExp = extractFloat64Exp( a ); - aSign = extractFloat64Sign( a ); - if ( 0x41E < aExp ) { - if ( ( aExp == 0x7FF ) && aSig ) aSign = 0; - goto invalid; - } - else if ( aExp < 0x3FF ) { - if ( aExp || aSig ) float_exception_flags |= float_flag_inexact; - return 0; - } - aSig |= LIT64( 0x0010000000000000 ); - shiftCount = 0x433 - aExp; - savedASig = aSig; - aSig >>= shiftCount; - z = aSig; - if ( aSign ) z = - z; - if ( ( z < 0 ) ^ aSign ) { - invalid: - float_raise( float_flag_invalid ); - return aSign ? (sbits32) 0x80000000 : 0x7FFFFFFF; - } - if ( ( aSig<>( - shiftCount ); - if ( (bits64) ( aSig<<( shiftCount & 63 ) ) ) { - float_exception_flags |= float_flag_inexact; - } - } - if ( aSign ) z = - z; - return z; - -} -#endif /* !SOFTFLOAT_FOR_GCC */ - -/* -------------------------------------------------------------------------------- -Returns the result of converting the double-precision floating-point value -`a' to the single-precision floating-point format. The conversion is -performed according to the IEC/IEEE Standard for Binary Floating-Point -Arithmetic. -------------------------------------------------------------------------------- -*/ -float32 float64_to_float32( float64 a ) -{ - flag aSign; - int16 aExp; - bits64 aSig; - bits32 zSig; - - aSig = extractFloat64Frac( a ); - aExp = extractFloat64Exp( a ); - aSign = extractFloat64Sign( a ); - if ( aExp == 0x7FF ) { - if ( aSig ) return commonNaNToFloat32( float64ToCommonNaN( a ) ); - return packFloat32( aSign, 0xFF, 0 ); - } - shift64RightJamming( aSig, 22, &aSig ); - zSig = aSig; - if ( aExp || zSig ) { - zSig |= 0x40000000; - aExp -= 0x381; - } - return roundAndPackFloat32( aSign, aExp, zSig ); - -} - -#ifdef FLOATX80 - -/* -------------------------------------------------------------------------------- -Returns the result of converting the double-precision floating-point value -`a' to the extended double-precision floating-point format. The conversion -is performed according to the IEC/IEEE Standard for Binary Floating-Point -Arithmetic. -------------------------------------------------------------------------------- -*/ -floatx80 float64_to_floatx80( float64 a ) -{ - flag aSign; - int16 aExp; - bits64 aSig; - - aSig = extractFloat64Frac( a ); - aExp = extractFloat64Exp( a ); - aSign = extractFloat64Sign( a ); - if ( aExp == 0x7FF ) { - if ( aSig ) return commonNaNToFloatx80( float64ToCommonNaN( a ) ); - return packFloatx80( aSign, 0x7FFF, LIT64( 0x8000000000000000 ) ); - } - if ( aExp == 0 ) { - if ( aSig == 0 ) return packFloatx80( aSign, 0, 0 ); - normalizeFloat64Subnormal( aSig, &aExp, &aSig ); - } - return - packFloatx80( - aSign, aExp + 0x3C00, ( aSig | LIT64( 0x0010000000000000 ) )<<11 ); - -} - -#endif - -#ifdef FLOAT128 - -/* -------------------------------------------------------------------------------- -Returns the result of converting the double-precision floating-point value -`a' to the quadruple-precision floating-point format. The conversion is -performed according to the IEC/IEEE Standard for Binary Floating-Point -Arithmetic. -------------------------------------------------------------------------------- -*/ -float128 float64_to_float128( float64 a ) -{ - flag aSign; - int16 aExp; - bits64 aSig, zSig0, zSig1; - - aSig = extractFloat64Frac( a ); - aExp = extractFloat64Exp( a ); - aSign = extractFloat64Sign( a ); - if ( aExp == 0x7FF ) { - if ( aSig ) return commonNaNToFloat128( float64ToCommonNaN( a ) ); - return packFloat128( aSign, 0x7FFF, 0, 0 ); - } - if ( aExp == 0 ) { - if ( aSig == 0 ) return packFloat128( aSign, 0, 0, 0 ); - normalizeFloat64Subnormal( aSig, &aExp, &aSig ); - --aExp; - } - shift128Right( aSig, 0, 4, &zSig0, &zSig1 ); - return packFloat128( aSign, aExp + 0x3C00, zSig0, zSig1 ); - -} - -#endif - -#ifndef SOFTFLOAT_FOR_GCC -/* -------------------------------------------------------------------------------- -Rounds the double-precision floating-point value `a' to an integer, and -returns the result as a double-precision floating-point value. The -operation is performed according to the IEC/IEEE Standard for Binary -Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float64 float64_round_to_int( float64 a ) -{ - flag aSign; - int16 aExp; - bits64 lastBitMask, roundBitsMask; - int8 roundingMode; - float64 z; - - aExp = extractFloat64Exp( a ); - if ( 0x433 <= aExp ) { - if ( ( aExp == 0x7FF ) && extractFloat64Frac( a ) ) { - return propagateFloat64NaN( a, a ); - } - return a; - } - if ( aExp < 0x3FF ) { - if ( (bits64) ( a<<1 ) == 0 ) return a; - float_exception_flags |= float_flag_inexact; - aSign = extractFloat64Sign( a ); - switch ( float_rounding_mode ) { - case float_round_nearest_even: - if ( ( aExp == 0x3FE ) && extractFloat64Frac( a ) ) { - return packFloat64( aSign, 0x3FF, 0 ); - } - break; - case float_round_to_zero: - break; - case float_round_down: - return aSign ? LIT64( 0xBFF0000000000000 ) : 0; - case float_round_up: - return - aSign ? LIT64( 0x8000000000000000 ) : LIT64( 0x3FF0000000000000 ); - } - return packFloat64( aSign, 0, 0 ); - } - lastBitMask = 1; - lastBitMask <<= 0x433 - aExp; - roundBitsMask = lastBitMask - 1; - z = a; - roundingMode = float_rounding_mode; - if ( roundingMode == float_round_nearest_even ) { - z += lastBitMask>>1; - if ( ( z & roundBitsMask ) == 0 ) z &= ~ lastBitMask; - } - else if ( roundingMode != float_round_to_zero ) { - if ( extractFloat64Sign( z ) ^ ( roundingMode == float_round_up ) ) { - z += roundBitsMask; - } - } - z &= ~ roundBitsMask; - if ( z != a ) float_exception_flags |= float_flag_inexact; - return z; - -} -#endif - -/* -------------------------------------------------------------------------------- -Returns the result of adding the absolute values of the double-precision -floating-point values `a' and `b'. If `zSign' is 1, the sum is negated -before being returned. `zSign' is ignored if the result is a NaN. -The addition is performed according to the IEC/IEEE Standard for Binary -Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -static float64 addFloat64Sigs( float64 a, float64 b, flag zSign ) -{ - int16 aExp, bExp, zExp; - bits64 aSig, bSig, zSig; - int16 expDiff; - - aSig = extractFloat64Frac( a ); - aExp = extractFloat64Exp( a ); - bSig = extractFloat64Frac( b ); - bExp = extractFloat64Exp( b ); - expDiff = aExp - bExp; - aSig <<= 9; - bSig <<= 9; - if ( 0 < expDiff ) { - if ( aExp == 0x7FF ) { - if ( aSig ) return propagateFloat64NaN( a, b ); - return a; - } - if ( bExp == 0 ) { - --expDiff; - } - else { - bSig |= LIT64( 0x2000000000000000 ); - } - shift64RightJamming( bSig, expDiff, &bSig ); - zExp = aExp; - } - else if ( expDiff < 0 ) { - if ( bExp == 0x7FF ) { - if ( bSig ) return propagateFloat64NaN( a, b ); - return packFloat64( zSign, 0x7FF, 0 ); - } - if ( aExp == 0 ) { - ++expDiff; - } - else { - aSig |= LIT64( 0x2000000000000000 ); - } - shift64RightJamming( aSig, - expDiff, &aSig ); - zExp = bExp; - } - else { - if ( aExp == 0x7FF ) { - if ( aSig | bSig ) return propagateFloat64NaN( a, b ); - return a; - } - if ( aExp == 0 ) return packFloat64( zSign, 0, ( aSig + bSig )>>9 ); - zSig = LIT64( 0x4000000000000000 ) + aSig + bSig; - zExp = aExp; - goto roundAndPack; - } - aSig |= LIT64( 0x2000000000000000 ); - zSig = ( aSig + bSig )<<1; - --zExp; - if ( (sbits64) zSig < 0 ) { - zSig = aSig + bSig; - ++zExp; - } - roundAndPack: - return roundAndPackFloat64( zSign, zExp, zSig ); - -} - -/* -------------------------------------------------------------------------------- -Returns the result of subtracting the absolute values of the double- -precision floating-point values `a' and `b'. If `zSign' is 1, the -difference is negated before being returned. `zSign' is ignored if the -result is a NaN. The subtraction is performed according to the IEC/IEEE -Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -static float64 subFloat64Sigs( float64 a, float64 b, flag zSign ) -{ - int16 aExp, bExp, zExp; - bits64 aSig, bSig, zSig; - int16 expDiff; - - aSig = extractFloat64Frac( a ); - aExp = extractFloat64Exp( a ); - bSig = extractFloat64Frac( b ); - bExp = extractFloat64Exp( b ); - expDiff = aExp - bExp; - aSig <<= 10; - bSig <<= 10; - if ( 0 < expDiff ) goto aExpBigger; - if ( expDiff < 0 ) goto bExpBigger; - if ( aExp == 0x7FF ) { - if ( aSig | bSig ) return propagateFloat64NaN( a, b ); - float_raise( float_flag_invalid ); - return float64_default_nan; - } - if ( aExp == 0 ) { - aExp = 1; - bExp = 1; - } - if ( bSig < aSig ) goto aBigger; - if ( aSig < bSig ) goto bBigger; - return packFloat64( float_rounding_mode == float_round_down, 0, 0 ); - bExpBigger: - if ( bExp == 0x7FF ) { - if ( bSig ) return propagateFloat64NaN( a, b ); - return packFloat64( zSign ^ 1, 0x7FF, 0 ); - } - if ( aExp == 0 ) { - ++expDiff; - } - else { - aSig |= LIT64( 0x4000000000000000 ); - } - shift64RightJamming( aSig, - expDiff, &aSig ); - bSig |= LIT64( 0x4000000000000000 ); - bBigger: - zSig = bSig - aSig; - zExp = bExp; - zSign ^= 1; - goto normalizeRoundAndPack; - aExpBigger: - if ( aExp == 0x7FF ) { - if ( aSig ) return propagateFloat64NaN( a, b ); - return a; - } - if ( bExp == 0 ) { - --expDiff; - } - else { - bSig |= LIT64( 0x4000000000000000 ); - } - shift64RightJamming( bSig, expDiff, &bSig ); - aSig |= LIT64( 0x4000000000000000 ); - aBigger: - zSig = aSig - bSig; - zExp = aExp; - normalizeRoundAndPack: - --zExp; - return normalizeRoundAndPackFloat64( zSign, zExp, zSig ); - -} - -/* -------------------------------------------------------------------------------- -Returns the result of adding the double-precision floating-point values `a' -and `b'. The operation is performed according to the IEC/IEEE Standard for -Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float64 float64_add( float64 a, float64 b ) -{ - flag aSign, bSign; - - aSign = extractFloat64Sign( a ); - bSign = extractFloat64Sign( b ); - if ( aSign == bSign ) { - return addFloat64Sigs( a, b, aSign ); - } - else { - return subFloat64Sigs( a, b, aSign ); - } - -} - -/* -------------------------------------------------------------------------------- -Returns the result of subtracting the double-precision floating-point values -`a' and `b'. The operation is performed according to the IEC/IEEE Standard -for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float64 float64_sub( float64 a, float64 b ) -{ - flag aSign, bSign; - - aSign = extractFloat64Sign( a ); - bSign = extractFloat64Sign( b ); - if ( aSign == bSign ) { - return subFloat64Sigs( a, b, aSign ); - } - else { - return addFloat64Sigs( a, b, aSign ); - } - -} - -/* -------------------------------------------------------------------------------- -Returns the result of multiplying the double-precision floating-point values -`a' and `b'. The operation is performed according to the IEC/IEEE Standard -for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float64 float64_mul( float64 a, float64 b ) -{ - flag aSign, bSign, zSign; - int16 aExp, bExp, zExp; - bits64 aSig, bSig, zSig0, zSig1; - - aSig = extractFloat64Frac( a ); - aExp = extractFloat64Exp( a ); - aSign = extractFloat64Sign( a ); - bSig = extractFloat64Frac( b ); - bExp = extractFloat64Exp( b ); - bSign = extractFloat64Sign( b ); - zSign = aSign ^ bSign; - if ( aExp == 0x7FF ) { - if ( aSig || ( ( bExp == 0x7FF ) && bSig ) ) { - return propagateFloat64NaN( a, b ); - } - if ( ( bExp | bSig ) == 0 ) { - float_raise( float_flag_invalid ); - return float64_default_nan; - } - return packFloat64( zSign, 0x7FF, 0 ); - } - if ( bExp == 0x7FF ) { - if ( bSig ) return propagateFloat64NaN( a, b ); - if ( ( aExp | aSig ) == 0 ) { - float_raise( float_flag_invalid ); - return float64_default_nan; - } - return packFloat64( zSign, 0x7FF, 0 ); - } - if ( aExp == 0 ) { - if ( aSig == 0 ) return packFloat64( zSign, 0, 0 ); - normalizeFloat64Subnormal( aSig, &aExp, &aSig ); - } - if ( bExp == 0 ) { - if ( bSig == 0 ) return packFloat64( zSign, 0, 0 ); - normalizeFloat64Subnormal( bSig, &bExp, &bSig ); - } - zExp = aExp + bExp - 0x3FF; - aSig = ( aSig | LIT64( 0x0010000000000000 ) )<<10; - bSig = ( bSig | LIT64( 0x0010000000000000 ) )<<11; - mul64To128( aSig, bSig, &zSig0, &zSig1 ); - zSig0 |= ( zSig1 != 0 ); - if ( 0 <= (sbits64) ( zSig0<<1 ) ) { - zSig0 <<= 1; - --zExp; - } - return roundAndPackFloat64( zSign, zExp, zSig0 ); - -} - -/* -------------------------------------------------------------------------------- -Returns the result of dividing the double-precision floating-point value `a' -by the corresponding value `b'. The operation is performed according to -the IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float64 float64_div( float64 a, float64 b ) -{ - flag aSign, bSign, zSign; - int16 aExp, bExp, zExp; - bits64 aSig, bSig, zSig; - bits64 rem0, rem1; - bits64 term0, term1; - - aSig = extractFloat64Frac( a ); - aExp = extractFloat64Exp( a ); - aSign = extractFloat64Sign( a ); - bSig = extractFloat64Frac( b ); - bExp = extractFloat64Exp( b ); - bSign = extractFloat64Sign( b ); - zSign = aSign ^ bSign; - if ( aExp == 0x7FF ) { - if ( aSig ) return propagateFloat64NaN( a, b ); - if ( bExp == 0x7FF ) { - if ( bSig ) return propagateFloat64NaN( a, b ); - float_raise( float_flag_invalid ); - return float64_default_nan; - } - return packFloat64( zSign, 0x7FF, 0 ); - } - if ( bExp == 0x7FF ) { - if ( bSig ) return propagateFloat64NaN( a, b ); - return packFloat64( zSign, 0, 0 ); - } - if ( bExp == 0 ) { - if ( bSig == 0 ) { - if ( ( aExp | aSig ) == 0 ) { - float_raise( float_flag_invalid ); - return float64_default_nan; - } - float_raise( float_flag_divbyzero ); - return packFloat64( zSign, 0x7FF, 0 ); - } - normalizeFloat64Subnormal( bSig, &bExp, &bSig ); - } - if ( aExp == 0 ) { - if ( aSig == 0 ) return packFloat64( zSign, 0, 0 ); - normalizeFloat64Subnormal( aSig, &aExp, &aSig ); - } - zExp = aExp - bExp + 0x3FD; - aSig = ( aSig | LIT64( 0x0010000000000000 ) )<<10; - bSig = ( bSig | LIT64( 0x0010000000000000 ) )<<11; - if ( bSig <= ( aSig + aSig ) ) { - aSig >>= 1; - ++zExp; - } - zSig = estimateDiv128To64( aSig, 0, bSig ); - if ( ( zSig & 0x1FF ) <= 2 ) { - mul64To128( bSig, zSig, &term0, &term1 ); - sub128( aSig, 0, term0, term1, &rem0, &rem1 ); - while ( (sbits64) rem0 < 0 ) { - --zSig; - add128( rem0, rem1, 0, bSig, &rem0, &rem1 ); - } - zSig |= ( rem1 != 0 ); - } - return roundAndPackFloat64( zSign, zExp, zSig ); - -} - -#ifndef SOFTFLOAT_FOR_GCC -/* -------------------------------------------------------------------------------- -Returns the remainder of the double-precision floating-point value `a' -with respect to the corresponding value `b'. The operation is performed -according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float64 float64_rem( float64 a, float64 b ) -{ - flag aSign, bSign, zSign; - int16 aExp, bExp, expDiff; - bits64 aSig, bSig; - bits64 q, alternateASig; - sbits64 sigMean; - - aSig = extractFloat64Frac( a ); - aExp = extractFloat64Exp( a ); - aSign = extractFloat64Sign( a ); - bSig = extractFloat64Frac( b ); - bExp = extractFloat64Exp( b ); - bSign = extractFloat64Sign( b ); - if ( aExp == 0x7FF ) { - if ( aSig || ( ( bExp == 0x7FF ) && bSig ) ) { - return propagateFloat64NaN( a, b ); - } - float_raise( float_flag_invalid ); - return float64_default_nan; - } - if ( bExp == 0x7FF ) { - if ( bSig ) return propagateFloat64NaN( a, b ); - return a; - } - if ( bExp == 0 ) { - if ( bSig == 0 ) { - float_raise( float_flag_invalid ); - return float64_default_nan; - } - normalizeFloat64Subnormal( bSig, &bExp, &bSig ); - } - if ( aExp == 0 ) { - if ( aSig == 0 ) return a; - normalizeFloat64Subnormal( aSig, &aExp, &aSig ); - } - expDiff = aExp - bExp; - aSig = ( aSig | LIT64( 0x0010000000000000 ) )<<11; - bSig = ( bSig | LIT64( 0x0010000000000000 ) )<<11; - if ( expDiff < 0 ) { - if ( expDiff < -1 ) return a; - aSig >>= 1; - } - q = ( bSig <= aSig ); - if ( q ) aSig -= bSig; - expDiff -= 64; - while ( 0 < expDiff ) { - q = estimateDiv128To64( aSig, 0, bSig ); - q = ( 2 < q ) ? q - 2 : 0; - aSig = - ( ( bSig>>2 ) * q ); - expDiff -= 62; - } - expDiff += 64; - if ( 0 < expDiff ) { - q = estimateDiv128To64( aSig, 0, bSig ); - q = ( 2 < q ) ? q - 2 : 0; - q >>= 64 - expDiff; - bSig >>= 2; - aSig = ( ( aSig>>1 )<<( expDiff - 1 ) ) - bSig * q; - } - else { - aSig >>= 2; - bSig >>= 2; - } - do { - alternateASig = aSig; - ++q; - aSig -= bSig; - } while ( 0 <= (sbits64) aSig ); - sigMean = aSig + alternateASig; - if ( ( sigMean < 0 ) || ( ( sigMean == 0 ) && ( q & 1 ) ) ) { - aSig = alternateASig; - } - zSign = ( (sbits64) aSig < 0 ); - if ( zSign ) aSig = - aSig; - return normalizeRoundAndPackFloat64( aSign ^ zSign, bExp, aSig ); - -} - -/* -------------------------------------------------------------------------------- -Returns the square root of the double-precision floating-point value `a'. -The operation is performed according to the IEC/IEEE Standard for Binary -Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float64 float64_sqrt( float64 a ) -{ - flag aSign; - int16 aExp, zExp; - bits64 aSig, zSig, doubleZSig; - bits64 rem0, rem1, term0, term1; - - aSig = extractFloat64Frac( a ); - aExp = extractFloat64Exp( a ); - aSign = extractFloat64Sign( a ); - if ( aExp == 0x7FF ) { - if ( aSig ) return propagateFloat64NaN( a, a ); - if ( ! aSign ) return a; - float_raise( float_flag_invalid ); - return float64_default_nan; - } - if ( aSign ) { - if ( ( aExp | aSig ) == 0 ) return a; - float_raise( float_flag_invalid ); - return float64_default_nan; - } - if ( aExp == 0 ) { - if ( aSig == 0 ) return 0; - normalizeFloat64Subnormal( aSig, &aExp, &aSig ); - } - zExp = ( ( aExp - 0x3FF )>>1 ) + 0x3FE; - aSig |= LIT64( 0x0010000000000000 ); - zSig = estimateSqrt32( aExp, aSig>>21 ); - aSig <<= 9 - ( aExp & 1 ); - zSig = estimateDiv128To64( aSig, 0, zSig<<32 ) + ( zSig<<30 ); - if ( ( zSig & 0x1FF ) <= 5 ) { - doubleZSig = zSig<<1; - mul64To128( zSig, zSig, &term0, &term1 ); - sub128( aSig, 0, term0, term1, &rem0, &rem1 ); - while ( (sbits64) rem0 < 0 ) { - --zSig; - doubleZSig -= 2; - add128( rem0, rem1, zSig>>63, doubleZSig | 1, &rem0, &rem1 ); - } - zSig |= ( ( rem0 | rem1 ) != 0 ); - } - return roundAndPackFloat64( 0, zExp, zSig ); - -} -#endif - -/* -------------------------------------------------------------------------------- -Returns 1 if the double-precision floating-point value `a' is equal to the -corresponding value `b', and 0 otherwise. The comparison is performed -according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -flag float64_eq( float64 a, float64 b ) -{ - - if ( ( ( extractFloat64Exp( a ) == 0x7FF ) && extractFloat64Frac( a ) ) - || ( ( extractFloat64Exp( b ) == 0x7FF ) && extractFloat64Frac( b ) ) - ) { - if ( float64_is_signaling_nan( a ) || float64_is_signaling_nan( b ) ) { - float_raise( float_flag_invalid ); - } - return 0; - } - return ( a == b ) || - ( (bits64) ( ( FLOAT64_DEMANGLE(a) | FLOAT64_DEMANGLE(b) )<<1 ) == 0 ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the double-precision floating-point value `a' is less than or -equal to the corresponding value `b', and 0 otherwise. The comparison is -performed according to the IEC/IEEE Standard for Binary Floating-Point -Arithmetic. -------------------------------------------------------------------------------- -*/ -flag float64_le( float64 a, float64 b ) -{ - flag aSign, bSign; - - if ( ( ( extractFloat64Exp( a ) == 0x7FF ) && extractFloat64Frac( a ) ) - || ( ( extractFloat64Exp( b ) == 0x7FF ) && extractFloat64Frac( b ) ) - ) { - float_raise( float_flag_invalid ); - return 0; - } - aSign = extractFloat64Sign( a ); - bSign = extractFloat64Sign( b ); - if ( aSign != bSign ) - return aSign || - ( (bits64) ( ( FLOAT64_DEMANGLE(a) | FLOAT64_DEMANGLE(b) )<<1 ) == - 0 ); - return ( a == b ) || - ( aSign ^ ( FLOAT64_DEMANGLE(a) < FLOAT64_DEMANGLE(b) ) ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the double-precision floating-point value `a' is less than -the corresponding value `b', and 0 otherwise. The comparison is performed -according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -flag float64_lt( float64 a, float64 b ) -{ - flag aSign, bSign; - - if ( ( ( extractFloat64Exp( a ) == 0x7FF ) && extractFloat64Frac( a ) ) - || ( ( extractFloat64Exp( b ) == 0x7FF ) && extractFloat64Frac( b ) ) - ) { - float_raise( float_flag_invalid ); - return 0; - } - aSign = extractFloat64Sign( a ); - bSign = extractFloat64Sign( b ); - if ( aSign != bSign ) - return aSign && - ( (bits64) ( ( FLOAT64_DEMANGLE(a) | FLOAT64_DEMANGLE(b) )<<1 ) != - 0 ); - return ( a != b ) && - ( aSign ^ ( FLOAT64_DEMANGLE(a) < FLOAT64_DEMANGLE(b) ) ); - -} - -#ifndef SOFTFLOAT_FOR_GCC -/* -------------------------------------------------------------------------------- -Returns 1 if the double-precision floating-point value `a' is equal to the -corresponding value `b', and 0 otherwise. The invalid exception is raised -if either operand is a NaN. Otherwise, the comparison is performed -according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -flag float64_eq_signaling( float64 a, float64 b ) -{ - - if ( ( ( extractFloat64Exp( a ) == 0x7FF ) && extractFloat64Frac( a ) ) - || ( ( extractFloat64Exp( b ) == 0x7FF ) && extractFloat64Frac( b ) ) - ) { - float_raise( float_flag_invalid ); - return 0; - } - return ( a == b ) || ( (bits64) ( ( a | b )<<1 ) == 0 ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the double-precision floating-point value `a' is less than or -equal to the corresponding value `b', and 0 otherwise. Quiet NaNs do not -cause an exception. Otherwise, the comparison is performed according to the -IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -flag float64_le_quiet( float64 a, float64 b ) -{ - flag aSign, bSign; - - if ( ( ( extractFloat64Exp( a ) == 0x7FF ) && extractFloat64Frac( a ) ) - || ( ( extractFloat64Exp( b ) == 0x7FF ) && extractFloat64Frac( b ) ) - ) { - if ( float64_is_signaling_nan( a ) || float64_is_signaling_nan( b ) ) { - float_raise( float_flag_invalid ); - } - return 0; - } - aSign = extractFloat64Sign( a ); - bSign = extractFloat64Sign( b ); - if ( aSign != bSign ) return aSign || ( (bits64) ( ( a | b )<<1 ) == 0 ); - return ( a == b ) || ( aSign ^ ( a < b ) ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the double-precision floating-point value `a' is less than -the corresponding value `b', and 0 otherwise. Quiet NaNs do not cause an -exception. Otherwise, the comparison is performed according to the IEC/IEEE -Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -flag float64_lt_quiet( float64 a, float64 b ) -{ - flag aSign, bSign; - - if ( ( ( extractFloat64Exp( a ) == 0x7FF ) && extractFloat64Frac( a ) ) - || ( ( extractFloat64Exp( b ) == 0x7FF ) && extractFloat64Frac( b ) ) - ) { - if ( float64_is_signaling_nan( a ) || float64_is_signaling_nan( b ) ) { - float_raise( float_flag_invalid ); - } - return 0; - } - aSign = extractFloat64Sign( a ); - bSign = extractFloat64Sign( b ); - if ( aSign != bSign ) return aSign && ( (bits64) ( ( a | b )<<1 ) != 0 ); - return ( a != b ) && ( aSign ^ ( a < b ) ); - -} -#endif - -#ifdef FLOATX80 - -/* -------------------------------------------------------------------------------- -Returns the result of converting the extended double-precision floating- -point value `a' to the 32-bit two's complement integer format. The -conversion is performed according to the IEC/IEEE Standard for Binary -Floating-Point Arithmetic---which means in particular that the conversion -is rounded according to the current rounding mode. If `a' is a NaN, the -largest positive integer is returned. Otherwise, if the conversion -overflows, the largest integer with the same sign as `a' is returned. -------------------------------------------------------------------------------- -*/ -int32 floatx80_to_int32( floatx80 a ) -{ - flag aSign; - int32 aExp, shiftCount; - bits64 aSig; - - aSig = extractFloatx80Frac( a ); - aExp = extractFloatx80Exp( a ); - aSign = extractFloatx80Sign( a ); - if ( ( aExp == 0x7FFF ) && (bits64) ( aSig<<1 ) ) aSign = 0; - shiftCount = 0x4037 - aExp; - if ( shiftCount <= 0 ) shiftCount = 1; - shift64RightJamming( aSig, shiftCount, &aSig ); - return roundAndPackInt32( aSign, aSig ); - -} - -/* -------------------------------------------------------------------------------- -Returns the result of converting the extended double-precision floating- -point value `a' to the 32-bit two's complement integer format. The -conversion is performed according to the IEC/IEEE Standard for Binary -Floating-Point Arithmetic, except that the conversion is always rounded -toward zero. If `a' is a NaN, the largest positive integer is returned. -Otherwise, if the conversion overflows, the largest integer with the same -sign as `a' is returned. -------------------------------------------------------------------------------- -*/ -int32 floatx80_to_int32_round_to_zero( floatx80 a ) -{ - flag aSign; - int32 aExp, shiftCount; - bits64 aSig, savedASig; - int32 z; - - aSig = extractFloatx80Frac( a ); - aExp = extractFloatx80Exp( a ); - aSign = extractFloatx80Sign( a ); - if ( 0x401E < aExp ) { - if ( ( aExp == 0x7FFF ) && (bits64) ( aSig<<1 ) ) aSign = 0; - goto invalid; - } - else if ( aExp < 0x3FFF ) { - if ( aExp || aSig ) float_exception_flags |= float_flag_inexact; - return 0; - } - shiftCount = 0x403E - aExp; - savedASig = aSig; - aSig >>= shiftCount; - z = aSig; - if ( aSign ) z = - z; - if ( ( z < 0 ) ^ aSign ) { - invalid: - float_raise( float_flag_invalid ); - return aSign ? (sbits32) 0x80000000 : 0x7FFFFFFF; - } - if ( ( aSig<>( - shiftCount ); - if ( (bits64) ( aSig<<( shiftCount & 63 ) ) ) { - float_exception_flags |= float_flag_inexact; - } - if ( aSign ) z = - z; - return z; - -} - -/* -------------------------------------------------------------------------------- -Returns the result of converting the extended double-precision floating- -point value `a' to the single-precision floating-point format. The -conversion is performed according to the IEC/IEEE Standard for Binary -Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float32 floatx80_to_float32( floatx80 a ) -{ - flag aSign; - int32 aExp; - bits64 aSig; - - aSig = extractFloatx80Frac( a ); - aExp = extractFloatx80Exp( a ); - aSign = extractFloatx80Sign( a ); - if ( aExp == 0x7FFF ) { - if ( (bits64) ( aSig<<1 ) ) { - return commonNaNToFloat32( floatx80ToCommonNaN( a ) ); - } - return packFloat32( aSign, 0xFF, 0 ); - } - shift64RightJamming( aSig, 33, &aSig ); - if ( aExp || aSig ) aExp -= 0x3F81; - return roundAndPackFloat32( aSign, aExp, aSig ); - -} - -/* -------------------------------------------------------------------------------- -Returns the result of converting the extended double-precision floating- -point value `a' to the double-precision floating-point format. The -conversion is performed according to the IEC/IEEE Standard for Binary -Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float64 floatx80_to_float64( floatx80 a ) -{ - flag aSign; - int32 aExp; - bits64 aSig, zSig; - - aSig = extractFloatx80Frac( a ); - aExp = extractFloatx80Exp( a ); - aSign = extractFloatx80Sign( a ); - if ( aExp == 0x7FFF ) { - if ( (bits64) ( aSig<<1 ) ) { - return commonNaNToFloat64( floatx80ToCommonNaN( a ) ); - } - return packFloat64( aSign, 0x7FF, 0 ); - } - shift64RightJamming( aSig, 1, &zSig ); - if ( aExp || aSig ) aExp -= 0x3C01; - return roundAndPackFloat64( aSign, aExp, zSig ); - -} - -#ifdef FLOAT128 - -/* -------------------------------------------------------------------------------- -Returns the result of converting the extended double-precision floating- -point value `a' to the quadruple-precision floating-point format. The -conversion is performed according to the IEC/IEEE Standard for Binary -Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float128 floatx80_to_float128( floatx80 a ) -{ - flag aSign; - int16 aExp; - bits64 aSig, zSig0, zSig1; - - aSig = extractFloatx80Frac( a ); - aExp = extractFloatx80Exp( a ); - aSign = extractFloatx80Sign( a ); - if ( ( aExp == 0x7FFF ) && (bits64) ( aSig<<1 ) ) { - return commonNaNToFloat128( floatx80ToCommonNaN( a ) ); - } - shift128Right( aSig<<1, 0, 16, &zSig0, &zSig1 ); - return packFloat128( aSign, aExp, zSig0, zSig1 ); - -} - -#endif - -/* -------------------------------------------------------------------------------- -Rounds the extended double-precision floating-point value `a' to an integer, -and returns the result as an extended quadruple-precision floating-point -value. The operation is performed according to the IEC/IEEE Standard for -Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -floatx80 floatx80_round_to_int( floatx80 a ) -{ - flag aSign; - int32 aExp; - bits64 lastBitMask, roundBitsMask; - int8 roundingMode; - floatx80 z; - - aExp = extractFloatx80Exp( a ); - if ( 0x403E <= aExp ) { - if ( ( aExp == 0x7FFF ) && (bits64) ( extractFloatx80Frac( a )<<1 ) ) { - return propagateFloatx80NaN( a, a ); - } - return a; - } - if ( aExp < 0x3FFF ) { - if ( ( aExp == 0 ) - && ( (bits64) ( extractFloatx80Frac( a )<<1 ) == 0 ) ) { - return a; - } - float_exception_flags |= float_flag_inexact; - aSign = extractFloatx80Sign( a ); - switch ( float_rounding_mode ) { - case float_round_nearest_even: - if ( ( aExp == 0x3FFE ) && (bits64) ( extractFloatx80Frac( a )<<1 ) - ) { - return - packFloatx80( aSign, 0x3FFF, LIT64( 0x8000000000000000 ) ); - } - break; - case float_round_to_zero: - break; - case float_round_down: - return - aSign ? - packFloatx80( 1, 0x3FFF, LIT64( 0x8000000000000000 ) ) - : packFloatx80( 0, 0, 0 ); - case float_round_up: - return - aSign ? packFloatx80( 1, 0, 0 ) - : packFloatx80( 0, 0x3FFF, LIT64( 0x8000000000000000 ) ); - } - return packFloatx80( aSign, 0, 0 ); - } - lastBitMask = 1; - lastBitMask <<= 0x403E - aExp; - roundBitsMask = lastBitMask - 1; - z = a; - roundingMode = float_rounding_mode; - if ( roundingMode == float_round_nearest_even ) { - z.low += lastBitMask>>1; - if ( ( z.low & roundBitsMask ) == 0 ) z.low &= ~ lastBitMask; - } - else if ( roundingMode != float_round_to_zero ) { - if ( extractFloatx80Sign( z ) ^ ( roundingMode == float_round_up ) ) { - z.low += roundBitsMask; - } - } - z.low &= ~ roundBitsMask; - if ( z.low == 0 ) { - ++z.high; - z.low = LIT64( 0x8000000000000000 ); - } - if ( z.low != a.low ) float_exception_flags |= float_flag_inexact; - return z; - -} - -/* -------------------------------------------------------------------------------- -Returns the result of adding the absolute values of the extended double- -precision floating-point values `a' and `b'. If `zSign' is 1, the sum is -negated before being returned. `zSign' is ignored if the result is a NaN. -The addition is performed according to the IEC/IEEE Standard for Binary -Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -static floatx80 addFloatx80Sigs( floatx80 a, floatx80 b, flag zSign ) -{ - int32 aExp, bExp, zExp; - bits64 aSig, bSig, zSig0, zSig1; - int32 expDiff; - - aSig = extractFloatx80Frac( a ); - aExp = extractFloatx80Exp( a ); - bSig = extractFloatx80Frac( b ); - bExp = extractFloatx80Exp( b ); - expDiff = aExp - bExp; - if ( 0 < expDiff ) { - if ( aExp == 0x7FFF ) { - if ( (bits64) ( aSig<<1 ) ) return propagateFloatx80NaN( a, b ); - return a; - } - if ( bExp == 0 ) --expDiff; - shift64ExtraRightJamming( bSig, 0, expDiff, &bSig, &zSig1 ); - zExp = aExp; - } - else if ( expDiff < 0 ) { - if ( bExp == 0x7FFF ) { - if ( (bits64) ( bSig<<1 ) ) return propagateFloatx80NaN( a, b ); - return packFloatx80( zSign, 0x7FFF, LIT64( 0x8000000000000000 ) ); - } - if ( aExp == 0 ) ++expDiff; - shift64ExtraRightJamming( aSig, 0, - expDiff, &aSig, &zSig1 ); - zExp = bExp; - } - else { - if ( aExp == 0x7FFF ) { - if ( (bits64) ( ( aSig | bSig )<<1 ) ) { - return propagateFloatx80NaN( a, b ); - } - return a; - } - zSig1 = 0; - zSig0 = aSig + bSig; - if ( aExp == 0 ) { - normalizeFloatx80Subnormal( zSig0, &zExp, &zSig0 ); - goto roundAndPack; - } - zExp = aExp; - goto shiftRight1; - } - zSig0 = aSig + bSig; - if ( (sbits64) zSig0 < 0 ) goto roundAndPack; - shiftRight1: - shift64ExtraRightJamming( zSig0, zSig1, 1, &zSig0, &zSig1 ); - zSig0 |= LIT64( 0x8000000000000000 ); - ++zExp; - roundAndPack: - return - roundAndPackFloatx80( - floatx80_rounding_precision, zSign, zExp, zSig0, zSig1 ); - -} - -/* -------------------------------------------------------------------------------- -Returns the result of subtracting the absolute values of the extended -double-precision floating-point values `a' and `b'. If `zSign' is 1, the -difference is negated before being returned. `zSign' is ignored if the -result is a NaN. The subtraction is performed according to the IEC/IEEE -Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -static floatx80 subFloatx80Sigs( floatx80 a, floatx80 b, flag zSign ) -{ - int32 aExp, bExp, zExp; - bits64 aSig, bSig, zSig0, zSig1; - int32 expDiff; - floatx80 z; - - aSig = extractFloatx80Frac( a ); - aExp = extractFloatx80Exp( a ); - bSig = extractFloatx80Frac( b ); - bExp = extractFloatx80Exp( b ); - expDiff = aExp - bExp; - if ( 0 < expDiff ) goto aExpBigger; - if ( expDiff < 0 ) goto bExpBigger; - if ( aExp == 0x7FFF ) { - if ( (bits64) ( ( aSig | bSig )<<1 ) ) { - return propagateFloatx80NaN( a, b ); - } - float_raise( float_flag_invalid ); - z.low = floatx80_default_nan_low; - z.high = floatx80_default_nan_high; - return z; - } - if ( aExp == 0 ) { - aExp = 1; - bExp = 1; - } - zSig1 = 0; - if ( bSig < aSig ) goto aBigger; - if ( aSig < bSig ) goto bBigger; - return packFloatx80( float_rounding_mode == float_round_down, 0, 0 ); - bExpBigger: - if ( bExp == 0x7FFF ) { - if ( (bits64) ( bSig<<1 ) ) return propagateFloatx80NaN( a, b ); - return packFloatx80( zSign ^ 1, 0x7FFF, LIT64( 0x8000000000000000 ) ); - } - if ( aExp == 0 ) ++expDiff; - shift128RightJamming( aSig, 0, - expDiff, &aSig, &zSig1 ); - bBigger: - sub128( bSig, 0, aSig, zSig1, &zSig0, &zSig1 ); - zExp = bExp; - zSign ^= 1; - goto normalizeRoundAndPack; - aExpBigger: - if ( aExp == 0x7FFF ) { - if ( (bits64) ( aSig<<1 ) ) return propagateFloatx80NaN( a, b ); - return a; - } - if ( bExp == 0 ) --expDiff; - shift128RightJamming( bSig, 0, expDiff, &bSig, &zSig1 ); - aBigger: - sub128( aSig, 0, bSig, zSig1, &zSig0, &zSig1 ); - zExp = aExp; - normalizeRoundAndPack: - return - normalizeRoundAndPackFloatx80( - floatx80_rounding_precision, zSign, zExp, zSig0, zSig1 ); - -} - -/* -------------------------------------------------------------------------------- -Returns the result of adding the extended double-precision floating-point -values `a' and `b'. The operation is performed according to the IEC/IEEE -Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -floatx80 floatx80_add( floatx80 a, floatx80 b ) -{ - flag aSign, bSign; - - aSign = extractFloatx80Sign( a ); - bSign = extractFloatx80Sign( b ); - if ( aSign == bSign ) { - return addFloatx80Sigs( a, b, aSign ); - } - else { - return subFloatx80Sigs( a, b, aSign ); - } - -} - -/* -------------------------------------------------------------------------------- -Returns the result of subtracting the extended double-precision floating- -point values `a' and `b'. The operation is performed according to the -IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -floatx80 floatx80_sub( floatx80 a, floatx80 b ) -{ - flag aSign, bSign; - - aSign = extractFloatx80Sign( a ); - bSign = extractFloatx80Sign( b ); - if ( aSign == bSign ) { - return subFloatx80Sigs( a, b, aSign ); - } - else { - return addFloatx80Sigs( a, b, aSign ); - } - -} - -/* -------------------------------------------------------------------------------- -Returns the result of multiplying the extended double-precision floating- -point values `a' and `b'. The operation is performed according to the -IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -floatx80 floatx80_mul( floatx80 a, floatx80 b ) -{ - flag aSign, bSign, zSign; - int32 aExp, bExp, zExp; - bits64 aSig, bSig, zSig0, zSig1; - floatx80 z; - - aSig = extractFloatx80Frac( a ); - aExp = extractFloatx80Exp( a ); - aSign = extractFloatx80Sign( a ); - bSig = extractFloatx80Frac( b ); - bExp = extractFloatx80Exp( b ); - bSign = extractFloatx80Sign( b ); - zSign = aSign ^ bSign; - if ( aExp == 0x7FFF ) { - if ( (bits64) ( aSig<<1 ) - || ( ( bExp == 0x7FFF ) && (bits64) ( bSig<<1 ) ) ) { - return propagateFloatx80NaN( a, b ); - } - if ( ( bExp | bSig ) == 0 ) goto invalid; - return packFloatx80( zSign, 0x7FFF, LIT64( 0x8000000000000000 ) ); - } - if ( bExp == 0x7FFF ) { - if ( (bits64) ( bSig<<1 ) ) return propagateFloatx80NaN( a, b ); - if ( ( aExp | aSig ) == 0 ) { - invalid: - float_raise( float_flag_invalid ); - z.low = floatx80_default_nan_low; - z.high = floatx80_default_nan_high; - return z; - } - return packFloatx80( zSign, 0x7FFF, LIT64( 0x8000000000000000 ) ); - } - if ( aExp == 0 ) { - if ( aSig == 0 ) return packFloatx80( zSign, 0, 0 ); - normalizeFloatx80Subnormal( aSig, &aExp, &aSig ); - } - if ( bExp == 0 ) { - if ( bSig == 0 ) return packFloatx80( zSign, 0, 0 ); - normalizeFloatx80Subnormal( bSig, &bExp, &bSig ); - } - zExp = aExp + bExp - 0x3FFE; - mul64To128( aSig, bSig, &zSig0, &zSig1 ); - if ( 0 < (sbits64) zSig0 ) { - shortShift128Left( zSig0, zSig1, 1, &zSig0, &zSig1 ); - --zExp; - } - return - roundAndPackFloatx80( - floatx80_rounding_precision, zSign, zExp, zSig0, zSig1 ); - -} - -/* -------------------------------------------------------------------------------- -Returns the result of dividing the extended double-precision floating-point -value `a' by the corresponding value `b'. The operation is performed -according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -floatx80 floatx80_div( floatx80 a, floatx80 b ) -{ - flag aSign, bSign, zSign; - int32 aExp, bExp, zExp; - bits64 aSig, bSig, zSig0, zSig1; - bits64 rem0, rem1, rem2, term0, term1, term2; - floatx80 z; - - aSig = extractFloatx80Frac( a ); - aExp = extractFloatx80Exp( a ); - aSign = extractFloatx80Sign( a ); - bSig = extractFloatx80Frac( b ); - bExp = extractFloatx80Exp( b ); - bSign = extractFloatx80Sign( b ); - zSign = aSign ^ bSign; - if ( aExp == 0x7FFF ) { - if ( (bits64) ( aSig<<1 ) ) return propagateFloatx80NaN( a, b ); - if ( bExp == 0x7FFF ) { - if ( (bits64) ( bSig<<1 ) ) return propagateFloatx80NaN( a, b ); - goto invalid; - } - return packFloatx80( zSign, 0x7FFF, LIT64( 0x8000000000000000 ) ); - } - if ( bExp == 0x7FFF ) { - if ( (bits64) ( bSig<<1 ) ) return propagateFloatx80NaN( a, b ); - return packFloatx80( zSign, 0, 0 ); - } - if ( bExp == 0 ) { - if ( bSig == 0 ) { - if ( ( aExp | aSig ) == 0 ) { - invalid: - float_raise( float_flag_invalid ); - z.low = floatx80_default_nan_low; - z.high = floatx80_default_nan_high; - return z; - } - float_raise( float_flag_divbyzero ); - return packFloatx80( zSign, 0x7FFF, LIT64( 0x8000000000000000 ) ); - } - normalizeFloatx80Subnormal( bSig, &bExp, &bSig ); - } - if ( aExp == 0 ) { - if ( aSig == 0 ) return packFloatx80( zSign, 0, 0 ); - normalizeFloatx80Subnormal( aSig, &aExp, &aSig ); - } - zExp = aExp - bExp + 0x3FFE; - rem1 = 0; - if ( bSig <= aSig ) { - shift128Right( aSig, 0, 1, &aSig, &rem1 ); - ++zExp; - } - zSig0 = estimateDiv128To64( aSig, rem1, bSig ); - mul64To128( bSig, zSig0, &term0, &term1 ); - sub128( aSig, rem1, term0, term1, &rem0, &rem1 ); - while ( (sbits64) rem0 < 0 ) { - --zSig0; - add128( rem0, rem1, 0, bSig, &rem0, &rem1 ); - } - zSig1 = estimateDiv128To64( rem1, 0, bSig ); - if ( (bits64) ( zSig1<<1 ) <= 8 ) { - mul64To128( bSig, zSig1, &term1, &term2 ); - sub128( rem1, 0, term1, term2, &rem1, &rem2 ); - while ( (sbits64) rem1 < 0 ) { - --zSig1; - add128( rem1, rem2, 0, bSig, &rem1, &rem2 ); - } - zSig1 |= ( ( rem1 | rem2 ) != 0 ); - } - return - roundAndPackFloatx80( - floatx80_rounding_precision, zSign, zExp, zSig0, zSig1 ); - -} - -/* -------------------------------------------------------------------------------- -Returns the remainder of the extended double-precision floating-point value -`a' with respect to the corresponding value `b'. The operation is performed -according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -floatx80 floatx80_rem( floatx80 a, floatx80 b ) -{ - flag aSign, bSign, zSign; - int32 aExp, bExp, expDiff; - bits64 aSig0, aSig1, bSig; - bits64 q, term0, term1, alternateASig0, alternateASig1; - floatx80 z; - - aSig0 = extractFloatx80Frac( a ); - aExp = extractFloatx80Exp( a ); - aSign = extractFloatx80Sign( a ); - bSig = extractFloatx80Frac( b ); - bExp = extractFloatx80Exp( b ); - bSign = extractFloatx80Sign( b ); - if ( aExp == 0x7FFF ) { - if ( (bits64) ( aSig0<<1 ) - || ( ( bExp == 0x7FFF ) && (bits64) ( bSig<<1 ) ) ) { - return propagateFloatx80NaN( a, b ); - } - goto invalid; - } - if ( bExp == 0x7FFF ) { - if ( (bits64) ( bSig<<1 ) ) return propagateFloatx80NaN( a, b ); - return a; - } - if ( bExp == 0 ) { - if ( bSig == 0 ) { - invalid: - float_raise( float_flag_invalid ); - z.low = floatx80_default_nan_low; - z.high = floatx80_default_nan_high; - return z; - } - normalizeFloatx80Subnormal( bSig, &bExp, &bSig ); - } - if ( aExp == 0 ) { - if ( (bits64) ( aSig0<<1 ) == 0 ) return a; - normalizeFloatx80Subnormal( aSig0, &aExp, &aSig0 ); - } - bSig |= LIT64( 0x8000000000000000 ); - zSign = aSign; - expDiff = aExp - bExp; - aSig1 = 0; - if ( expDiff < 0 ) { - if ( expDiff < -1 ) return a; - shift128Right( aSig0, 0, 1, &aSig0, &aSig1 ); - expDiff = 0; - } - q = ( bSig <= aSig0 ); - if ( q ) aSig0 -= bSig; - expDiff -= 64; - while ( 0 < expDiff ) { - q = estimateDiv128To64( aSig0, aSig1, bSig ); - q = ( 2 < q ) ? q - 2 : 0; - mul64To128( bSig, q, &term0, &term1 ); - sub128( aSig0, aSig1, term0, term1, &aSig0, &aSig1 ); - shortShift128Left( aSig0, aSig1, 62, &aSig0, &aSig1 ); - expDiff -= 62; - } - expDiff += 64; - if ( 0 < expDiff ) { - q = estimateDiv128To64( aSig0, aSig1, bSig ); - q = ( 2 < q ) ? q - 2 : 0; - q >>= 64 - expDiff; - mul64To128( bSig, q<<( 64 - expDiff ), &term0, &term1 ); - sub128( aSig0, aSig1, term0, term1, &aSig0, &aSig1 ); - shortShift128Left( 0, bSig, 64 - expDiff, &term0, &term1 ); - while ( le128( term0, term1, aSig0, aSig1 ) ) { - ++q; - sub128( aSig0, aSig1, term0, term1, &aSig0, &aSig1 ); - } - } - else { - term1 = 0; - term0 = bSig; - } - sub128( term0, term1, aSig0, aSig1, &alternateASig0, &alternateASig1 ); - if ( lt128( alternateASig0, alternateASig1, aSig0, aSig1 ) - || ( eq128( alternateASig0, alternateASig1, aSig0, aSig1 ) - && ( q & 1 ) ) - ) { - aSig0 = alternateASig0; - aSig1 = alternateASig1; - zSign = ! zSign; - } - return - normalizeRoundAndPackFloatx80( - 80, zSign, bExp + expDiff, aSig0, aSig1 ); - -} - -/* -------------------------------------------------------------------------------- -Returns the square root of the extended double-precision floating-point -value `a'. The operation is performed according to the IEC/IEEE Standard -for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -floatx80 floatx80_sqrt( floatx80 a ) -{ - flag aSign; - int32 aExp, zExp; - bits64 aSig0, aSig1, zSig0, zSig1, doubleZSig0; - bits64 rem0, rem1, rem2, rem3, term0, term1, term2, term3; - floatx80 z; - - aSig0 = extractFloatx80Frac( a ); - aExp = extractFloatx80Exp( a ); - aSign = extractFloatx80Sign( a ); - if ( aExp == 0x7FFF ) { - if ( (bits64) ( aSig0<<1 ) ) return propagateFloatx80NaN( a, a ); - if ( ! aSign ) return a; - goto invalid; - } - if ( aSign ) { - if ( ( aExp | aSig0 ) == 0 ) return a; - invalid: - float_raise( float_flag_invalid ); - z.low = floatx80_default_nan_low; - z.high = floatx80_default_nan_high; - return z; - } - if ( aExp == 0 ) { - if ( aSig0 == 0 ) return packFloatx80( 0, 0, 0 ); - normalizeFloatx80Subnormal( aSig0, &aExp, &aSig0 ); - } - zExp = ( ( aExp - 0x3FFF )>>1 ) + 0x3FFF; - zSig0 = estimateSqrt32( aExp, aSig0>>32 ); - shift128Right( aSig0, 0, 2 + ( aExp & 1 ), &aSig0, &aSig1 ); - zSig0 = estimateDiv128To64( aSig0, aSig1, zSig0<<32 ) + ( zSig0<<30 ); - doubleZSig0 = zSig0<<1; - mul64To128( zSig0, zSig0, &term0, &term1 ); - sub128( aSig0, aSig1, term0, term1, &rem0, &rem1 ); - while ( (sbits64) rem0 < 0 ) { - --zSig0; - doubleZSig0 -= 2; - add128( rem0, rem1, zSig0>>63, doubleZSig0 | 1, &rem0, &rem1 ); - } - zSig1 = estimateDiv128To64( rem1, 0, doubleZSig0 ); - if ( ( zSig1 & LIT64( 0x3FFFFFFFFFFFFFFF ) ) <= 5 ) { - if ( zSig1 == 0 ) zSig1 = 1; - mul64To128( doubleZSig0, zSig1, &term1, &term2 ); - sub128( rem1, 0, term1, term2, &rem1, &rem2 ); - mul64To128( zSig1, zSig1, &term2, &term3 ); - sub192( rem1, rem2, 0, 0, term2, term3, &rem1, &rem2, &rem3 ); - while ( (sbits64) rem1 < 0 ) { - --zSig1; - shortShift128Left( 0, zSig1, 1, &term2, &term3 ); - term3 |= 1; - term2 |= doubleZSig0; - add192( rem1, rem2, rem3, 0, term2, term3, &rem1, &rem2, &rem3 ); - } - zSig1 |= ( ( rem1 | rem2 | rem3 ) != 0 ); - } - shortShift128Left( 0, zSig1, 1, &zSig0, &zSig1 ); - zSig0 |= doubleZSig0; - return - roundAndPackFloatx80( - floatx80_rounding_precision, 0, zExp, zSig0, zSig1 ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the extended double-precision floating-point value `a' is -equal to the corresponding value `b', and 0 otherwise. The comparison is -performed according to the IEC/IEEE Standard for Binary Floating-Point -Arithmetic. -------------------------------------------------------------------------------- -*/ -flag floatx80_eq( floatx80 a, floatx80 b ) -{ - - if ( ( ( extractFloatx80Exp( a ) == 0x7FFF ) - && (bits64) ( extractFloatx80Frac( a )<<1 ) ) - || ( ( extractFloatx80Exp( b ) == 0x7FFF ) - && (bits64) ( extractFloatx80Frac( b )<<1 ) ) - ) { - if ( floatx80_is_signaling_nan( a ) - || floatx80_is_signaling_nan( b ) ) { - float_raise( float_flag_invalid ); - } - return 0; - } - return - ( a.low == b.low ) - && ( ( a.high == b.high ) - || ( ( a.low == 0 ) - && ( (bits16) ( ( a.high | b.high )<<1 ) == 0 ) ) - ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the extended double-precision floating-point value `a' is -less than or equal to the corresponding value `b', and 0 otherwise. The -comparison is performed according to the IEC/IEEE Standard for Binary -Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -flag floatx80_le( floatx80 a, floatx80 b ) -{ - flag aSign, bSign; - - if ( ( ( extractFloatx80Exp( a ) == 0x7FFF ) - && (bits64) ( extractFloatx80Frac( a )<<1 ) ) - || ( ( extractFloatx80Exp( b ) == 0x7FFF ) - && (bits64) ( extractFloatx80Frac( b )<<1 ) ) - ) { - float_raise( float_flag_invalid ); - return 0; - } - aSign = extractFloatx80Sign( a ); - bSign = extractFloatx80Sign( b ); - if ( aSign != bSign ) { - return - aSign - || ( ( ( (bits16) ( ( a.high | b.high )<<1 ) ) | a.low | b.low ) - == 0 ); - } - return - aSign ? le128( b.high, b.low, a.high, a.low ) - : le128( a.high, a.low, b.high, b.low ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the extended double-precision floating-point value `a' is -less than the corresponding value `b', and 0 otherwise. The comparison -is performed according to the IEC/IEEE Standard for Binary Floating-Point -Arithmetic. -------------------------------------------------------------------------------- -*/ -flag floatx80_lt( floatx80 a, floatx80 b ) -{ - flag aSign, bSign; - - if ( ( ( extractFloatx80Exp( a ) == 0x7FFF ) - && (bits64) ( extractFloatx80Frac( a )<<1 ) ) - || ( ( extractFloatx80Exp( b ) == 0x7FFF ) - && (bits64) ( extractFloatx80Frac( b )<<1 ) ) - ) { - float_raise( float_flag_invalid ); - return 0; - } - aSign = extractFloatx80Sign( a ); - bSign = extractFloatx80Sign( b ); - if ( aSign != bSign ) { - return - aSign - && ( ( ( (bits16) ( ( a.high | b.high )<<1 ) ) | a.low | b.low ) - != 0 ); - } - return - aSign ? lt128( b.high, b.low, a.high, a.low ) - : lt128( a.high, a.low, b.high, b.low ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the extended double-precision floating-point value `a' is equal -to the corresponding value `b', and 0 otherwise. The invalid exception is -raised if either operand is a NaN. Otherwise, the comparison is performed -according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -flag floatx80_eq_signaling( floatx80 a, floatx80 b ) -{ - - if ( ( ( extractFloatx80Exp( a ) == 0x7FFF ) - && (bits64) ( extractFloatx80Frac( a )<<1 ) ) - || ( ( extractFloatx80Exp( b ) == 0x7FFF ) - && (bits64) ( extractFloatx80Frac( b )<<1 ) ) - ) { - float_raise( float_flag_invalid ); - return 0; - } - return - ( a.low == b.low ) - && ( ( a.high == b.high ) - || ( ( a.low == 0 ) - && ( (bits16) ( ( a.high | b.high )<<1 ) == 0 ) ) - ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the extended double-precision floating-point value `a' is less -than or equal to the corresponding value `b', and 0 otherwise. Quiet NaNs -do not cause an exception. Otherwise, the comparison is performed according -to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -flag floatx80_le_quiet( floatx80 a, floatx80 b ) -{ - flag aSign, bSign; - - if ( ( ( extractFloatx80Exp( a ) == 0x7FFF ) - && (bits64) ( extractFloatx80Frac( a )<<1 ) ) - || ( ( extractFloatx80Exp( b ) == 0x7FFF ) - && (bits64) ( extractFloatx80Frac( b )<<1 ) ) - ) { - if ( floatx80_is_signaling_nan( a ) - || floatx80_is_signaling_nan( b ) ) { - float_raise( float_flag_invalid ); - } - return 0; - } - aSign = extractFloatx80Sign( a ); - bSign = extractFloatx80Sign( b ); - if ( aSign != bSign ) { - return - aSign - || ( ( ( (bits16) ( ( a.high | b.high )<<1 ) ) | a.low | b.low ) - == 0 ); - } - return - aSign ? le128( b.high, b.low, a.high, a.low ) - : le128( a.high, a.low, b.high, b.low ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the extended double-precision floating-point value `a' is less -than the corresponding value `b', and 0 otherwise. Quiet NaNs do not cause -an exception. Otherwise, the comparison is performed according to the -IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -flag floatx80_lt_quiet( floatx80 a, floatx80 b ) -{ - flag aSign, bSign; - - if ( ( ( extractFloatx80Exp( a ) == 0x7FFF ) - && (bits64) ( extractFloatx80Frac( a )<<1 ) ) - || ( ( extractFloatx80Exp( b ) == 0x7FFF ) - && (bits64) ( extractFloatx80Frac( b )<<1 ) ) - ) { - if ( floatx80_is_signaling_nan( a ) - || floatx80_is_signaling_nan( b ) ) { - float_raise( float_flag_invalid ); - } - return 0; - } - aSign = extractFloatx80Sign( a ); - bSign = extractFloatx80Sign( b ); - if ( aSign != bSign ) { - return - aSign - && ( ( ( (bits16) ( ( a.high | b.high )<<1 ) ) | a.low | b.low ) - != 0 ); - } - return - aSign ? lt128( b.high, b.low, a.high, a.low ) - : lt128( a.high, a.low, b.high, b.low ); - -} - -#endif - -#ifdef FLOAT128 - -/* -------------------------------------------------------------------------------- -Returns the result of converting the quadruple-precision floating-point -value `a' to the 32-bit two's complement integer format. The conversion -is performed according to the IEC/IEEE Standard for Binary Floating-Point -Arithmetic---which means in particular that the conversion is rounded -according to the current rounding mode. If `a' is a NaN, the largest -positive integer is returned. Otherwise, if the conversion overflows, the -largest integer with the same sign as `a' is returned. -------------------------------------------------------------------------------- -*/ -int32 float128_to_int32( float128 a ) -{ - flag aSign; - int32 aExp, shiftCount; - bits64 aSig0, aSig1; - - aSig1 = extractFloat128Frac1( a ); - aSig0 = extractFloat128Frac0( a ); - aExp = extractFloat128Exp( a ); - aSign = extractFloat128Sign( a ); - if ( ( aExp == 0x7FFF ) && ( aSig0 | aSig1 ) ) aSign = 0; - if ( aExp ) aSig0 |= LIT64( 0x0001000000000000 ); - aSig0 |= ( aSig1 != 0 ); - shiftCount = 0x4028 - aExp; - if ( 0 < shiftCount ) shift64RightJamming( aSig0, shiftCount, &aSig0 ); - return roundAndPackInt32( aSign, aSig0 ); - -} - -/* -------------------------------------------------------------------------------- -Returns the result of converting the quadruple-precision floating-point -value `a' to the 32-bit two's complement integer format. The conversion -is performed according to the IEC/IEEE Standard for Binary Floating-Point -Arithmetic, except that the conversion is always rounded toward zero. If -`a' is a NaN, the largest positive integer is returned. Otherwise, if the -conversion overflows, the largest integer with the same sign as `a' is -returned. -------------------------------------------------------------------------------- -*/ -int32 float128_to_int32_round_to_zero( float128 a ) -{ - flag aSign; - int32 aExp, shiftCount; - bits64 aSig0, aSig1, savedASig; - int32 z; - - aSig1 = extractFloat128Frac1( a ); - aSig0 = extractFloat128Frac0( a ); - aExp = extractFloat128Exp( a ); - aSign = extractFloat128Sign( a ); - aSig0 |= ( aSig1 != 0 ); - if ( 0x401E < aExp ) { - if ( ( aExp == 0x7FFF ) && aSig0 ) aSign = 0; - goto invalid; - } - else if ( aExp < 0x3FFF ) { - if ( aExp || aSig0 ) float_exception_flags |= float_flag_inexact; - return 0; - } - aSig0 |= LIT64( 0x0001000000000000 ); - shiftCount = 0x402F - aExp; - savedASig = aSig0; - aSig0 >>= shiftCount; - z = aSig0; - if ( aSign ) z = - z; - if ( ( z < 0 ) ^ aSign ) { - invalid: - float_raise( float_flag_invalid ); - return aSign ? (sbits32) 0x80000000 : 0x7FFFFFFF; - } - if ( ( aSig0<>( ( - shiftCount ) & 63 ) ); - if ( (bits64) ( aSig1<>( - shiftCount ); - if ( aSig1 - || ( shiftCount && (bits64) ( aSig0<<( shiftCount & 63 ) ) ) ) { - float_exception_flags |= float_flag_inexact; - } - } - if ( aSign ) z = - z; - return z; - -} - -/* - * just like above - but do not care for overflow of signed results - */ -uint64 float128_to_uint64_round_to_zero( float128 a ) -{ - flag aSign; - int32 aExp, shiftCount; - bits64 aSig0, aSig1; - uint64 z; - - aSig1 = extractFloat128Frac1( a ); - aSig0 = extractFloat128Frac0( a ); - aExp = extractFloat128Exp( a ); - aSign = extractFloat128Sign( a ); - if ( aExp ) aSig0 |= LIT64( 0x0001000000000000 ); - shiftCount = aExp - 0x402F; - if ( 0 < shiftCount ) { - if ( 0x403F <= aExp ) { - aSig0 &= LIT64( 0x0000FFFFFFFFFFFF ); - if ( ( a.high == LIT64( 0xC03E000000000000 ) ) - && ( aSig1 < LIT64( 0x0002000000000000 ) ) ) { - if ( aSig1 ) float_exception_flags |= float_flag_inexact; - } - else { - float_raise( float_flag_invalid ); - } - return LIT64( 0xFFFFFFFFFFFFFFFF ); - } - z = ( aSig0<>( ( - shiftCount ) & 63 ) ); - if ( (bits64) ( aSig1<>( - shiftCount ); - if (aSig1 || ( shiftCount && (bits64) ( aSig0<<( shiftCount & 63 ) ) ) ) { - float_exception_flags |= float_flag_inexact; - } - } - if ( aSign ) z = - z; - return z; - -} - -/* -------------------------------------------------------------------------------- -Returns the result of converting the quadruple-precision floating-point -value `a' to the single-precision floating-point format. The conversion -is performed according to the IEC/IEEE Standard for Binary Floating-Point -Arithmetic. -------------------------------------------------------------------------------- -*/ -float32 float128_to_float32( float128 a ) -{ - flag aSign; - int32 aExp; - bits64 aSig0, aSig1; - bits32 zSig; - - aSig1 = extractFloat128Frac1( a ); - aSig0 = extractFloat128Frac0( a ); - aExp = extractFloat128Exp( a ); - aSign = extractFloat128Sign( a ); - if ( aExp == 0x7FFF ) { - if ( aSig0 | aSig1 ) { - return commonNaNToFloat32( float128ToCommonNaN( a ) ); - } - return packFloat32( aSign, 0xFF, 0 ); - } - aSig0 |= ( aSig1 != 0 ); - shift64RightJamming( aSig0, 18, &aSig0 ); - zSig = aSig0; - if ( aExp || zSig ) { - zSig |= 0x40000000; - aExp -= 0x3F81; - } - return roundAndPackFloat32( aSign, aExp, zSig ); - -} - -/* -------------------------------------------------------------------------------- -Returns the result of converting the quadruple-precision floating-point -value `a' to the double-precision floating-point format. The conversion -is performed according to the IEC/IEEE Standard for Binary Floating-Point -Arithmetic. -------------------------------------------------------------------------------- -*/ -float64 float128_to_float64( float128 a ) -{ - flag aSign; - int32 aExp; - bits64 aSig0, aSig1; - - aSig1 = extractFloat128Frac1( a ); - aSig0 = extractFloat128Frac0( a ); - aExp = extractFloat128Exp( a ); - aSign = extractFloat128Sign( a ); - if ( aExp == 0x7FFF ) { - if ( aSig0 | aSig1 ) { - return commonNaNToFloat64( float128ToCommonNaN( a ) ); - } - return packFloat64( aSign, 0x7FF, 0 ); - } - shortShift128Left( aSig0, aSig1, 14, &aSig0, &aSig1 ); - aSig0 |= ( aSig1 != 0 ); - if ( aExp || aSig0 ) { - aSig0 |= LIT64( 0x4000000000000000 ); - aExp -= 0x3C01; - } - return roundAndPackFloat64( aSign, aExp, aSig0 ); - -} - -#ifdef FLOATX80 - -/* -------------------------------------------------------------------------------- -Returns the result of converting the quadruple-precision floating-point -value `a' to the extended double-precision floating-point format. The -conversion is performed according to the IEC/IEEE Standard for Binary -Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -floatx80 float128_to_floatx80( float128 a ) -{ - flag aSign; - int32 aExp; - bits64 aSig0, aSig1; - - aSig1 = extractFloat128Frac1( a ); - aSig0 = extractFloat128Frac0( a ); - aExp = extractFloat128Exp( a ); - aSign = extractFloat128Sign( a ); - if ( aExp == 0x7FFF ) { - if ( aSig0 | aSig1 ) { - return commonNaNToFloatx80( float128ToCommonNaN( a ) ); - } - return packFloatx80( aSign, 0x7FFF, LIT64( 0x8000000000000000 ) ); - } - if ( aExp == 0 ) { - if ( ( aSig0 | aSig1 ) == 0 ) return packFloatx80( aSign, 0, 0 ); - normalizeFloat128Subnormal( aSig0, aSig1, &aExp, &aSig0, &aSig1 ); - } - else { - aSig0 |= LIT64( 0x0001000000000000 ); - } - shortShift128Left( aSig0, aSig1, 15, &aSig0, &aSig1 ); - return roundAndPackFloatx80( 80, aSign, aExp, aSig0, aSig1 ); - -} - -#endif - -/* -------------------------------------------------------------------------------- -Rounds the quadruple-precision floating-point value `a' to an integer, and -returns the result as a quadruple-precision floating-point value. The -operation is performed according to the IEC/IEEE Standard for Binary -Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float128 float128_round_to_int( float128 a ) -{ - flag aSign; - int32 aExp; - bits64 lastBitMask, roundBitsMask; - int8 roundingMode; - float128 z; - - aExp = extractFloat128Exp( a ); - if ( 0x402F <= aExp ) { - if ( 0x406F <= aExp ) { - if ( ( aExp == 0x7FFF ) - && ( extractFloat128Frac0( a ) | extractFloat128Frac1( a ) ) - ) { - return propagateFloat128NaN( a, a ); - } - return a; - } - lastBitMask = 1; - lastBitMask = ( lastBitMask<<( 0x406E - aExp ) )<<1; - roundBitsMask = lastBitMask - 1; - z = a; - roundingMode = float_rounding_mode; - if ( roundingMode == float_round_nearest_even ) { - if ( lastBitMask ) { - add128( z.high, z.low, 0, lastBitMask>>1, &z.high, &z.low ); - if ( ( z.low & roundBitsMask ) == 0 ) z.low &= ~ lastBitMask; - } - else { - if ( (sbits64) z.low < 0 ) { - ++z.high; - if ( (bits64) ( z.low<<1 ) == 0 ) z.high &= ~1; - } - } - } - else if ( roundingMode != float_round_to_zero ) { - if ( extractFloat128Sign( z ) - ^ ( roundingMode == float_round_up ) ) { - add128( z.high, z.low, 0, roundBitsMask, &z.high, &z.low ); - } - } - z.low &= ~ roundBitsMask; - } - else { - if ( aExp < 0x3FFF ) { - if ( ( ( (bits64) ( a.high<<1 ) ) | a.low ) == 0 ) return a; - float_exception_flags |= float_flag_inexact; - aSign = extractFloat128Sign( a ); - switch ( float_rounding_mode ) { - case float_round_nearest_even: - if ( ( aExp == 0x3FFE ) - && ( extractFloat128Frac0( a ) - | extractFloat128Frac1( a ) ) - ) { - return packFloat128( aSign, 0x3FFF, 0, 0 ); - } - break; - case float_round_to_zero: - break; - case float_round_down: - return - aSign ? packFloat128( 1, 0x3FFF, 0, 0 ) - : packFloat128( 0, 0, 0, 0 ); - case float_round_up: - return - aSign ? packFloat128( 1, 0, 0, 0 ) - : packFloat128( 0, 0x3FFF, 0, 0 ); - } - return packFloat128( aSign, 0, 0, 0 ); - } - lastBitMask = 1; - lastBitMask <<= 0x402F - aExp; - roundBitsMask = lastBitMask - 1; - z.low = 0; - z.high = a.high; - roundingMode = float_rounding_mode; - if ( roundingMode == float_round_nearest_even ) { - z.high += lastBitMask>>1; - if ( ( ( z.high & roundBitsMask ) | a.low ) == 0 ) { - z.high &= ~ lastBitMask; - } - } - else if ( roundingMode != float_round_to_zero ) { - if ( extractFloat128Sign( z ) - ^ ( roundingMode == float_round_up ) ) { - z.high |= ( a.low != 0 ); - z.high += roundBitsMask; - } - } - z.high &= ~ roundBitsMask; - } - if ( ( z.low != a.low ) || ( z.high != a.high ) ) { - float_exception_flags |= float_flag_inexact; - } - return z; - -} - -/* -------------------------------------------------------------------------------- -Returns the result of adding the absolute values of the quadruple-precision -floating-point values `a' and `b'. If `zSign' is 1, the sum is negated -before being returned. `zSign' is ignored if the result is a NaN. -The addition is performed according to the IEC/IEEE Standard for Binary -Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -static float128 addFloat128Sigs( float128 a, float128 b, flag zSign ) -{ - int32 aExp, bExp, zExp; - bits64 aSig0, aSig1, bSig0, bSig1, zSig0, zSig1, zSig2; - int32 expDiff; - - aSig1 = extractFloat128Frac1( a ); - aSig0 = extractFloat128Frac0( a ); - aExp = extractFloat128Exp( a ); - bSig1 = extractFloat128Frac1( b ); - bSig0 = extractFloat128Frac0( b ); - bExp = extractFloat128Exp( b ); - expDiff = aExp - bExp; - if ( 0 < expDiff ) { - if ( aExp == 0x7FFF ) { - if ( aSig0 | aSig1 ) return propagateFloat128NaN( a, b ); - return a; - } - if ( bExp == 0 ) { - --expDiff; - } - else { - bSig0 |= LIT64( 0x0001000000000000 ); - } - shift128ExtraRightJamming( - bSig0, bSig1, 0, expDiff, &bSig0, &bSig1, &zSig2 ); - zExp = aExp; - } - else if ( expDiff < 0 ) { - if ( bExp == 0x7FFF ) { - if ( bSig0 | bSig1 ) return propagateFloat128NaN( a, b ); - return packFloat128( zSign, 0x7FFF, 0, 0 ); - } - if ( aExp == 0 ) { - ++expDiff; - } - else { - aSig0 |= LIT64( 0x0001000000000000 ); - } - shift128ExtraRightJamming( - aSig0, aSig1, 0, - expDiff, &aSig0, &aSig1, &zSig2 ); - zExp = bExp; - } - else { - if ( aExp == 0x7FFF ) { - if ( aSig0 | aSig1 | bSig0 | bSig1 ) { - return propagateFloat128NaN( a, b ); - } - return a; - } - add128( aSig0, aSig1, bSig0, bSig1, &zSig0, &zSig1 ); - if ( aExp == 0 ) return packFloat128( zSign, 0, zSig0, zSig1 ); - zSig2 = 0; - zSig0 |= LIT64( 0x0002000000000000 ); - zExp = aExp; - goto shiftRight1; - } - aSig0 |= LIT64( 0x0001000000000000 ); - add128( aSig0, aSig1, bSig0, bSig1, &zSig0, &zSig1 ); - --zExp; - if ( zSig0 < LIT64( 0x0002000000000000 ) ) goto roundAndPack; - ++zExp; - shiftRight1: - shift128ExtraRightJamming( - zSig0, zSig1, zSig2, 1, &zSig0, &zSig1, &zSig2 ); - roundAndPack: - return roundAndPackFloat128( zSign, zExp, zSig0, zSig1, zSig2 ); - -} - -/* -------------------------------------------------------------------------------- -Returns the result of subtracting the absolute values of the quadruple- -precision floating-point values `a' and `b'. If `zSign' is 1, the -difference is negated before being returned. `zSign' is ignored if the -result is a NaN. The subtraction is performed according to the IEC/IEEE -Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -static float128 subFloat128Sigs( float128 a, float128 b, flag zSign ) -{ - int32 aExp, bExp, zExp; - bits64 aSig0, aSig1, bSig0, bSig1, zSig0, zSig1; - int32 expDiff; - float128 z; - - aSig1 = extractFloat128Frac1( a ); - aSig0 = extractFloat128Frac0( a ); - aExp = extractFloat128Exp( a ); - bSig1 = extractFloat128Frac1( b ); - bSig0 = extractFloat128Frac0( b ); - bExp = extractFloat128Exp( b ); - expDiff = aExp - bExp; - shortShift128Left( aSig0, aSig1, 14, &aSig0, &aSig1 ); - shortShift128Left( bSig0, bSig1, 14, &bSig0, &bSig1 ); - if ( 0 < expDiff ) goto aExpBigger; - if ( expDiff < 0 ) goto bExpBigger; - if ( aExp == 0x7FFF ) { - if ( aSig0 | aSig1 | bSig0 | bSig1 ) { - return propagateFloat128NaN( a, b ); - } - float_raise( float_flag_invalid ); - z.low = float128_default_nan_low; - z.high = float128_default_nan_high; - return z; - } - if ( aExp == 0 ) { - aExp = 1; - bExp = 1; - } - if ( bSig0 < aSig0 ) goto aBigger; - if ( aSig0 < bSig0 ) goto bBigger; - if ( bSig1 < aSig1 ) goto aBigger; - if ( aSig1 < bSig1 ) goto bBigger; - return packFloat128( float_rounding_mode == float_round_down, 0, 0, 0 ); - bExpBigger: - if ( bExp == 0x7FFF ) { - if ( bSig0 | bSig1 ) return propagateFloat128NaN( a, b ); - return packFloat128( zSign ^ 1, 0x7FFF, 0, 0 ); - } - if ( aExp == 0 ) { - ++expDiff; - } - else { - aSig0 |= LIT64( 0x4000000000000000 ); - } - shift128RightJamming( aSig0, aSig1, - expDiff, &aSig0, &aSig1 ); - bSig0 |= LIT64( 0x4000000000000000 ); - bBigger: - sub128( bSig0, bSig1, aSig0, aSig1, &zSig0, &zSig1 ); - zExp = bExp; - zSign ^= 1; - goto normalizeRoundAndPack; - aExpBigger: - if ( aExp == 0x7FFF ) { - if ( aSig0 | aSig1 ) return propagateFloat128NaN( a, b ); - return a; - } - if ( bExp == 0 ) { - --expDiff; - } - else { - bSig0 |= LIT64( 0x4000000000000000 ); - } - shift128RightJamming( bSig0, bSig1, expDiff, &bSig0, &bSig1 ); - aSig0 |= LIT64( 0x4000000000000000 ); - aBigger: - sub128( aSig0, aSig1, bSig0, bSig1, &zSig0, &zSig1 ); - zExp = aExp; - normalizeRoundAndPack: - --zExp; - return normalizeRoundAndPackFloat128( zSign, zExp - 14, zSig0, zSig1 ); - -} - -/* -------------------------------------------------------------------------------- -Returns the result of adding the quadruple-precision floating-point values -`a' and `b'. The operation is performed according to the IEC/IEEE Standard -for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float128 float128_add( float128 a, float128 b ) -{ - flag aSign, bSign; - - aSign = extractFloat128Sign( a ); - bSign = extractFloat128Sign( b ); - if ( aSign == bSign ) { - return addFloat128Sigs( a, b, aSign ); - } - else { - return subFloat128Sigs( a, b, aSign ); - } - -} - -/* -------------------------------------------------------------------------------- -Returns the result of subtracting the quadruple-precision floating-point -values `a' and `b'. The operation is performed according to the IEC/IEEE -Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float128 float128_sub( float128 a, float128 b ) -{ - flag aSign, bSign; - - aSign = extractFloat128Sign( a ); - bSign = extractFloat128Sign( b ); - if ( aSign == bSign ) { - return subFloat128Sigs( a, b, aSign ); - } - else { - return addFloat128Sigs( a, b, aSign ); - } - -} - -/* -------------------------------------------------------------------------------- -Returns the result of multiplying the quadruple-precision floating-point -values `a' and `b'. The operation is performed according to the IEC/IEEE -Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float128 float128_mul( float128 a, float128 b ) -{ - flag aSign, bSign, zSign; - int32 aExp, bExp, zExp; - bits64 aSig0, aSig1, bSig0, bSig1, zSig0, zSig1, zSig2, zSig3; - float128 z; - - aSig1 = extractFloat128Frac1( a ); - aSig0 = extractFloat128Frac0( a ); - aExp = extractFloat128Exp( a ); - aSign = extractFloat128Sign( a ); - bSig1 = extractFloat128Frac1( b ); - bSig0 = extractFloat128Frac0( b ); - bExp = extractFloat128Exp( b ); - bSign = extractFloat128Sign( b ); - zSign = aSign ^ bSign; - if ( aExp == 0x7FFF ) { - if ( ( aSig0 | aSig1 ) - || ( ( bExp == 0x7FFF ) && ( bSig0 | bSig1 ) ) ) { - return propagateFloat128NaN( a, b ); - } - if ( ( bExp | bSig0 | bSig1 ) == 0 ) goto invalid; - return packFloat128( zSign, 0x7FFF, 0, 0 ); - } - if ( bExp == 0x7FFF ) { - if ( bSig0 | bSig1 ) return propagateFloat128NaN( a, b ); - if ( ( aExp | aSig0 | aSig1 ) == 0 ) { - invalid: - float_raise( float_flag_invalid ); - z.low = float128_default_nan_low; - z.high = float128_default_nan_high; - return z; - } - return packFloat128( zSign, 0x7FFF, 0, 0 ); - } - if ( aExp == 0 ) { - if ( ( aSig0 | aSig1 ) == 0 ) return packFloat128( zSign, 0, 0, 0 ); - normalizeFloat128Subnormal( aSig0, aSig1, &aExp, &aSig0, &aSig1 ); - } - if ( bExp == 0 ) { - if ( ( bSig0 | bSig1 ) == 0 ) return packFloat128( zSign, 0, 0, 0 ); - normalizeFloat128Subnormal( bSig0, bSig1, &bExp, &bSig0, &bSig1 ); - } - zExp = aExp + bExp - 0x4000; - aSig0 |= LIT64( 0x0001000000000000 ); - shortShift128Left( bSig0, bSig1, 16, &bSig0, &bSig1 ); - mul128To256( aSig0, aSig1, bSig0, bSig1, &zSig0, &zSig1, &zSig2, &zSig3 ); - add128( zSig0, zSig1, aSig0, aSig1, &zSig0, &zSig1 ); - zSig2 |= ( zSig3 != 0 ); - if ( LIT64( 0x0002000000000000 ) <= zSig0 ) { - shift128ExtraRightJamming( - zSig0, zSig1, zSig2, 1, &zSig0, &zSig1, &zSig2 ); - ++zExp; - } - return roundAndPackFloat128( zSign, zExp, zSig0, zSig1, zSig2 ); - -} - -/* -------------------------------------------------------------------------------- -Returns the result of dividing the quadruple-precision floating-point value -`a' by the corresponding value `b'. The operation is performed according to -the IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float128 float128_div( float128 a, float128 b ) -{ - flag aSign, bSign, zSign; - int32 aExp, bExp, zExp; - bits64 aSig0, aSig1, bSig0, bSig1, zSig0, zSig1, zSig2; - bits64 rem0, rem1, rem2, rem3, term0, term1, term2, term3; - float128 z; - - aSig1 = extractFloat128Frac1( a ); - aSig0 = extractFloat128Frac0( a ); - aExp = extractFloat128Exp( a ); - aSign = extractFloat128Sign( a ); - bSig1 = extractFloat128Frac1( b ); - bSig0 = extractFloat128Frac0( b ); - bExp = extractFloat128Exp( b ); - bSign = extractFloat128Sign( b ); - zSign = aSign ^ bSign; - if ( aExp == 0x7FFF ) { - if ( aSig0 | aSig1 ) return propagateFloat128NaN( a, b ); - if ( bExp == 0x7FFF ) { - if ( bSig0 | bSig1 ) return propagateFloat128NaN( a, b ); - goto invalid; - } - return packFloat128( zSign, 0x7FFF, 0, 0 ); - } - if ( bExp == 0x7FFF ) { - if ( bSig0 | bSig1 ) return propagateFloat128NaN( a, b ); - return packFloat128( zSign, 0, 0, 0 ); - } - if ( bExp == 0 ) { - if ( ( bSig0 | bSig1 ) == 0 ) { - if ( ( aExp | aSig0 | aSig1 ) == 0 ) { - invalid: - float_raise( float_flag_invalid ); - z.low = float128_default_nan_low; - z.high = float128_default_nan_high; - return z; - } - float_raise( float_flag_divbyzero ); - return packFloat128( zSign, 0x7FFF, 0, 0 ); - } - normalizeFloat128Subnormal( bSig0, bSig1, &bExp, &bSig0, &bSig1 ); - } - if ( aExp == 0 ) { - if ( ( aSig0 | aSig1 ) == 0 ) return packFloat128( zSign, 0, 0, 0 ); - normalizeFloat128Subnormal( aSig0, aSig1, &aExp, &aSig0, &aSig1 ); - } - zExp = aExp - bExp + 0x3FFD; - shortShift128Left( - aSig0 | LIT64( 0x0001000000000000 ), aSig1, 15, &aSig0, &aSig1 ); - shortShift128Left( - bSig0 | LIT64( 0x0001000000000000 ), bSig1, 15, &bSig0, &bSig1 ); - if ( le128( bSig0, bSig1, aSig0, aSig1 ) ) { - shift128Right( aSig0, aSig1, 1, &aSig0, &aSig1 ); - ++zExp; - } - zSig0 = estimateDiv128To64( aSig0, aSig1, bSig0 ); - mul128By64To192( bSig0, bSig1, zSig0, &term0, &term1, &term2 ); - sub192( aSig0, aSig1, 0, term0, term1, term2, &rem0, &rem1, &rem2 ); - while ( (sbits64) rem0 < 0 ) { - --zSig0; - add192( rem0, rem1, rem2, 0, bSig0, bSig1, &rem0, &rem1, &rem2 ); - } - zSig1 = estimateDiv128To64( rem1, rem2, bSig0 ); - if ( ( zSig1 & 0x3FFF ) <= 4 ) { - mul128By64To192( bSig0, bSig1, zSig1, &term1, &term2, &term3 ); - sub192( rem1, rem2, 0, term1, term2, term3, &rem1, &rem2, &rem3 ); - while ( (sbits64) rem1 < 0 ) { - --zSig1; - add192( rem1, rem2, rem3, 0, bSig0, bSig1, &rem1, &rem2, &rem3 ); - } - zSig1 |= ( ( rem1 | rem2 | rem3 ) != 0 ); - } - shift128ExtraRightJamming( zSig0, zSig1, 0, 15, &zSig0, &zSig1, &zSig2 ); - return roundAndPackFloat128( zSign, zExp, zSig0, zSig1, zSig2 ); - -} - -/* -------------------------------------------------------------------------------- -Returns the remainder of the quadruple-precision floating-point value `a' -with respect to the corresponding value `b'. The operation is performed -according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float128 float128_rem( float128 a, float128 b ) -{ - flag aSign, bSign, zSign; - int32 aExp, bExp, expDiff; - bits64 aSig0, aSig1, bSig0, bSig1, q, term0, term1, term2; - bits64 allZero, alternateASig0, alternateASig1, sigMean1; - sbits64 sigMean0; - float128 z; - - aSig1 = extractFloat128Frac1( a ); - aSig0 = extractFloat128Frac0( a ); - aExp = extractFloat128Exp( a ); - aSign = extractFloat128Sign( a ); - bSig1 = extractFloat128Frac1( b ); - bSig0 = extractFloat128Frac0( b ); - bExp = extractFloat128Exp( b ); - bSign = extractFloat128Sign( b ); - if ( aExp == 0x7FFF ) { - if ( ( aSig0 | aSig1 ) - || ( ( bExp == 0x7FFF ) && ( bSig0 | bSig1 ) ) ) { - return propagateFloat128NaN( a, b ); - } - goto invalid; - } - if ( bExp == 0x7FFF ) { - if ( bSig0 | bSig1 ) return propagateFloat128NaN( a, b ); - return a; - } - if ( bExp == 0 ) { - if ( ( bSig0 | bSig1 ) == 0 ) { - invalid: - float_raise( float_flag_invalid ); - z.low = float128_default_nan_low; - z.high = float128_default_nan_high; - return z; - } - normalizeFloat128Subnormal( bSig0, bSig1, &bExp, &bSig0, &bSig1 ); - } - if ( aExp == 0 ) { - if ( ( aSig0 | aSig1 ) == 0 ) return a; - normalizeFloat128Subnormal( aSig0, aSig1, &aExp, &aSig0, &aSig1 ); - } - expDiff = aExp - bExp; - if ( expDiff < -1 ) return a; - shortShift128Left( - aSig0 | LIT64( 0x0001000000000000 ), - aSig1, - 15 - ( expDiff < 0 ), - &aSig0, - &aSig1 - ); - shortShift128Left( - bSig0 | LIT64( 0x0001000000000000 ), bSig1, 15, &bSig0, &bSig1 ); - q = le128( bSig0, bSig1, aSig0, aSig1 ); - if ( q ) sub128( aSig0, aSig1, bSig0, bSig1, &aSig0, &aSig1 ); - expDiff -= 64; - while ( 0 < expDiff ) { - q = estimateDiv128To64( aSig0, aSig1, bSig0 ); - q = ( 4 < q ) ? q - 4 : 0; - mul128By64To192( bSig0, bSig1, q, &term0, &term1, &term2 ); - shortShift192Left( term0, term1, term2, 61, &term1, &term2, &allZero ); - shortShift128Left( aSig0, aSig1, 61, &aSig0, &allZero ); - sub128( aSig0, 0, term1, term2, &aSig0, &aSig1 ); - expDiff -= 61; - } - if ( -64 < expDiff ) { - q = estimateDiv128To64( aSig0, aSig1, bSig0 ); - q = ( 4 < q ) ? q - 4 : 0; - q >>= - expDiff; - shift128Right( bSig0, bSig1, 12, &bSig0, &bSig1 ); - expDiff += 52; - if ( expDiff < 0 ) { - shift128Right( aSig0, aSig1, - expDiff, &aSig0, &aSig1 ); - } - else { - shortShift128Left( aSig0, aSig1, expDiff, &aSig0, &aSig1 ); - } - mul128By64To192( bSig0, bSig1, q, &term0, &term1, &term2 ); - sub128( aSig0, aSig1, term1, term2, &aSig0, &aSig1 ); - } - else { - shift128Right( aSig0, aSig1, 12, &aSig0, &aSig1 ); - shift128Right( bSig0, bSig1, 12, &bSig0, &bSig1 ); - } - do { - alternateASig0 = aSig0; - alternateASig1 = aSig1; - ++q; - sub128( aSig0, aSig1, bSig0, bSig1, &aSig0, &aSig1 ); - } while ( 0 <= (sbits64) aSig0 ); - add128( - aSig0, aSig1, alternateASig0, alternateASig1, (bits64 *)&sigMean0, &sigMean1 ); - if ( ( sigMean0 < 0 ) - || ( ( ( sigMean0 | sigMean1 ) == 0 ) && ( q & 1 ) ) ) { - aSig0 = alternateASig0; - aSig1 = alternateASig1; - } - zSign = ( (sbits64) aSig0 < 0 ); - if ( zSign ) sub128( 0, 0, aSig0, aSig1, &aSig0, &aSig1 ); - return - normalizeRoundAndPackFloat128( aSign ^ zSign, bExp - 4, aSig0, aSig1 ); - -} - -/* -------------------------------------------------------------------------------- -Returns the square root of the quadruple-precision floating-point value `a'. -The operation is performed according to the IEC/IEEE Standard for Binary -Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -float128 float128_sqrt( float128 a ) -{ - flag aSign; - int32 aExp, zExp; - bits64 aSig0, aSig1, zSig0, zSig1, zSig2, doubleZSig0; - bits64 rem0, rem1, rem2, rem3, term0, term1, term2, term3; - float128 z; - - aSig1 = extractFloat128Frac1( a ); - aSig0 = extractFloat128Frac0( a ); - aExp = extractFloat128Exp( a ); - aSign = extractFloat128Sign( a ); - if ( aExp == 0x7FFF ) { - if ( aSig0 | aSig1 ) return propagateFloat128NaN( a, a ); - if ( ! aSign ) return a; - goto invalid; - } - if ( aSign ) { - if ( ( aExp | aSig0 | aSig1 ) == 0 ) return a; - invalid: - float_raise( float_flag_invalid ); - z.low = float128_default_nan_low; - z.high = float128_default_nan_high; - return z; - } - if ( aExp == 0 ) { - if ( ( aSig0 | aSig1 ) == 0 ) return packFloat128( 0, 0, 0, 0 ); - normalizeFloat128Subnormal( aSig0, aSig1, &aExp, &aSig0, &aSig1 ); - } - zExp = ( ( aExp - 0x3FFF )>>1 ) + 0x3FFE; - aSig0 |= LIT64( 0x0001000000000000 ); - zSig0 = estimateSqrt32( aExp, aSig0>>17 ); - shortShift128Left( aSig0, aSig1, 13 - ( aExp & 1 ), &aSig0, &aSig1 ); - zSig0 = estimateDiv128To64( aSig0, aSig1, zSig0<<32 ) + ( zSig0<<30 ); - doubleZSig0 = zSig0<<1; - mul64To128( zSig0, zSig0, &term0, &term1 ); - sub128( aSig0, aSig1, term0, term1, &rem0, &rem1 ); - while ( (sbits64) rem0 < 0 ) { - --zSig0; - doubleZSig0 -= 2; - add128( rem0, rem1, zSig0>>63, doubleZSig0 | 1, &rem0, &rem1 ); - } - zSig1 = estimateDiv128To64( rem1, 0, doubleZSig0 ); - if ( ( zSig1 & 0x1FFF ) <= 5 ) { - if ( zSig1 == 0 ) zSig1 = 1; - mul64To128( doubleZSig0, zSig1, &term1, &term2 ); - sub128( rem1, 0, term1, term2, &rem1, &rem2 ); - mul64To128( zSig1, zSig1, &term2, &term3 ); - sub192( rem1, rem2, 0, 0, term2, term3, &rem1, &rem2, &rem3 ); - while ( (sbits64) rem1 < 0 ) { - --zSig1; - shortShift128Left( 0, zSig1, 1, &term2, &term3 ); - term3 |= 1; - term2 |= doubleZSig0; - add192( rem1, rem2, rem3, 0, term2, term3, &rem1, &rem2, &rem3 ); - } - zSig1 |= ( ( rem1 | rem2 | rem3 ) != 0 ); - } - shift128ExtraRightJamming( zSig0, zSig1, 0, 14, &zSig0, &zSig1, &zSig2 ); - return roundAndPackFloat128( 0, zExp, zSig0, zSig1, zSig2 ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the quadruple-precision floating-point value `a' is equal to -the corresponding value `b', and 0 otherwise. The comparison is performed -according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -flag float128_eq( float128 a, float128 b ) -{ - - if ( ( ( extractFloat128Exp( a ) == 0x7FFF ) - && ( extractFloat128Frac0( a ) | extractFloat128Frac1( a ) ) ) - || ( ( extractFloat128Exp( b ) == 0x7FFF ) - && ( extractFloat128Frac0( b ) | extractFloat128Frac1( b ) ) ) - ) { - if ( float128_is_signaling_nan( a ) - || float128_is_signaling_nan( b ) ) { - float_raise( float_flag_invalid ); - } - return 0; - } - return - ( a.low == b.low ) - && ( ( a.high == b.high ) - || ( ( a.low == 0 ) - && ( (bits64) ( ( a.high | b.high )<<1 ) == 0 ) ) - ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the quadruple-precision floating-point value `a' is less than -or equal to the corresponding value `b', and 0 otherwise. The comparison -is performed according to the IEC/IEEE Standard for Binary Floating-Point -Arithmetic. -------------------------------------------------------------------------------- -*/ -flag float128_le( float128 a, float128 b ) -{ - flag aSign, bSign; - - if ( ( ( extractFloat128Exp( a ) == 0x7FFF ) - && ( extractFloat128Frac0( a ) | extractFloat128Frac1( a ) ) ) - || ( ( extractFloat128Exp( b ) == 0x7FFF ) - && ( extractFloat128Frac0( b ) | extractFloat128Frac1( b ) ) ) - ) { - float_raise( float_flag_invalid ); - return 0; - } - aSign = extractFloat128Sign( a ); - bSign = extractFloat128Sign( b ); - if ( aSign != bSign ) { - return - aSign - || ( ( ( (bits64) ( ( a.high | b.high )<<1 ) ) | a.low | b.low ) - == 0 ); - } - return - aSign ? le128( b.high, b.low, a.high, a.low ) - : le128( a.high, a.low, b.high, b.low ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the quadruple-precision floating-point value `a' is less than -the corresponding value `b', and 0 otherwise. The comparison is performed -according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -flag float128_lt( float128 a, float128 b ) -{ - flag aSign, bSign; - - if ( ( ( extractFloat128Exp( a ) == 0x7FFF ) - && ( extractFloat128Frac0( a ) | extractFloat128Frac1( a ) ) ) - || ( ( extractFloat128Exp( b ) == 0x7FFF ) - && ( extractFloat128Frac0( b ) | extractFloat128Frac1( b ) ) ) - ) { - float_raise( float_flag_invalid ); - return 0; - } - aSign = extractFloat128Sign( a ); - bSign = extractFloat128Sign( b ); - if ( aSign != bSign ) { - return - aSign - && ( ( ( (bits64) ( ( a.high | b.high )<<1 ) ) | a.low | b.low ) - != 0 ); - } - return - aSign ? lt128( b.high, b.low, a.high, a.low ) - : lt128( a.high, a.low, b.high, b.low ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the quadruple-precision floating-point value `a' is equal to -the corresponding value `b', and 0 otherwise. The invalid exception is -raised if either operand is a NaN. Otherwise, the comparison is performed -according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -flag float128_eq_signaling( float128 a, float128 b ) -{ - - if ( ( ( extractFloat128Exp( a ) == 0x7FFF ) - && ( extractFloat128Frac0( a ) | extractFloat128Frac1( a ) ) ) - || ( ( extractFloat128Exp( b ) == 0x7FFF ) - && ( extractFloat128Frac0( b ) | extractFloat128Frac1( b ) ) ) - ) { - float_raise( float_flag_invalid ); - return 0; - } - return - ( a.low == b.low ) - && ( ( a.high == b.high ) - || ( ( a.low == 0 ) - && ( (bits64) ( ( a.high | b.high )<<1 ) == 0 ) ) - ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the quadruple-precision floating-point value `a' is less than -or equal to the corresponding value `b', and 0 otherwise. Quiet NaNs do not -cause an exception. Otherwise, the comparison is performed according to the -IEC/IEEE Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -flag float128_le_quiet( float128 a, float128 b ) -{ - flag aSign, bSign; - - if ( ( ( extractFloat128Exp( a ) == 0x7FFF ) - && ( extractFloat128Frac0( a ) | extractFloat128Frac1( a ) ) ) - || ( ( extractFloat128Exp( b ) == 0x7FFF ) - && ( extractFloat128Frac0( b ) | extractFloat128Frac1( b ) ) ) - ) { - if ( float128_is_signaling_nan( a ) - || float128_is_signaling_nan( b ) ) { - float_raise( float_flag_invalid ); - } - return 0; - } - aSign = extractFloat128Sign( a ); - bSign = extractFloat128Sign( b ); - if ( aSign != bSign ) { - return - aSign - || ( ( ( (bits64) ( ( a.high | b.high )<<1 ) ) | a.low | b.low ) - == 0 ); - } - return - aSign ? le128( b.high, b.low, a.high, a.low ) - : le128( a.high, a.low, b.high, b.low ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the quadruple-precision floating-point value `a' is less than -the corresponding value `b', and 0 otherwise. Quiet NaNs do not cause an -exception. Otherwise, the comparison is performed according to the IEC/IEEE -Standard for Binary Floating-Point Arithmetic. -------------------------------------------------------------------------------- -*/ -flag float128_lt_quiet( float128 a, float128 b ) -{ - flag aSign, bSign; - - if ( ( ( extractFloat128Exp( a ) == 0x7FFF ) - && ( extractFloat128Frac0( a ) | extractFloat128Frac1( a ) ) ) - || ( ( extractFloat128Exp( b ) == 0x7FFF ) - && ( extractFloat128Frac0( b ) | extractFloat128Frac1( b ) ) ) - ) { - if ( float128_is_signaling_nan( a ) - || float128_is_signaling_nan( b ) ) { - float_raise( float_flag_invalid ); - } - return 0; - } - aSign = extractFloat128Sign( a ); - bSign = extractFloat128Sign( b ); - if ( aSign != bSign ) { - return - aSign - && ( ( ( (bits64) ( ( a.high | b.high )<<1 ) ) | a.low | b.low ) - != 0 ); - } - return - aSign ? lt128( b.high, b.low, a.high, a.low ) - : lt128( a.high, a.low, b.high, b.low ); - -} - -#endif - - -#if defined(SOFTFLOAT_FOR_GCC) && defined(SOFTFLOAT_NEED_FIXUNS) - -/* - * These two routines are not part of the original softfloat distribution. - * - * They are based on the corresponding conversions to integer but return - * unsigned numbers instead since these functions are required by GCC. - * - * Added by Mark Brinicombe 27/09/97 - * - * float64 version overhauled for SoftFloat 2a [bjh21 2000-07-15] - */ - -/* -------------------------------------------------------------------------------- -Returns the result of converting the double-precision floating-point value -`a' to the 32-bit unsigned integer format. The conversion is -performed according to the IEC/IEEE Standard for Binary Floating-point -Arithmetic, except that the conversion is always rounded toward zero. If -`a' is a NaN, the largest positive integer is returned. If the conversion -overflows, the largest integer positive is returned. -------------------------------------------------------------------------------- -*/ -uint32 float64_to_uint32_round_to_zero( float64 a ) -{ - flag aSign; - int16 aExp, shiftCount; - bits64 aSig, savedASig; - uint32 z; - - aSig = extractFloat64Frac( a ); - aExp = extractFloat64Exp( a ); - aSign = extractFloat64Sign( a ); - - if (aSign) { - float_raise( float_flag_invalid ); - return(0); - } - - if ( 0x41E < aExp ) { - float_raise( float_flag_invalid ); - return 0xffffffff; - } - else if ( aExp < 0x3FF ) { - if ( aExp || aSig ) float_exception_flags |= float_flag_inexact; - return 0; - } - aSig |= LIT64( 0x0010000000000000 ); - shiftCount = 0x433 - aExp; - savedASig = aSig; - aSig >>= shiftCount; - z = aSig; - if ( ( aSig<>( - shiftCount ); - if ( aSig<<( shiftCount & 31 ) ) { - float_exception_flags |= float_flag_inexact; - } - return z; - -} - -#endif diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/eqdf2.c b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/eqdf2.c deleted file mode 100644 index 1322b8ee1981..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/eqdf2.c +++ /dev/null @@ -1,19 +0,0 @@ -/* NetBSD: eqdf2.c,v 1.1 2000/06/06 08:15:02 bjh21 Exp */ - -/* - * Written by Ben Harris, 2000. This file is in the Public Domain. - */ - -#include "softfloat-for-gcc.h" -#include "milieu.h" -#include "softfloat.h" - -flag __eqdf2(float64, float64); - -flag -__eqdf2(float64 a, float64 b) -{ - - /* libgcc1.c says !(a == b) */ - return !float64_eq(a, b); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/eqsf2.c b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/eqsf2.c deleted file mode 100644 index fd7551fe0266..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/eqsf2.c +++ /dev/null @@ -1,19 +0,0 @@ -/* NetBSD: eqsf2.c,v 1.1 2000/06/06 08:15:03 bjh21 Exp */ - -/* - * Written by Ben Harris, 2000. This file is in the Public Domain. - */ - -#include "softfloat-for-gcc.h" -#include "milieu.h" -#include "softfloat.h" - -flag __eqsf2(float32, float32); - -flag -__eqsf2(float32 a, float32 b) -{ - - /* libgcc1.c says !(a == b) */ - return !float32_eq(a, b); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/fpgetmask.c b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/fpgetmask.c deleted file mode 100644 index 62e41ade336e..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/fpgetmask.c +++ /dev/null @@ -1,50 +0,0 @@ -/* NetBSD: fpgetmask.c,v 1.4 2008/04/28 20:23:00 martin Exp */ - -/*- - * Copyright (c) 1997 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Neil A. Carson and Mark Brinicombe - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR 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 FOUNDATION 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 "namespace.h" - -#include -#ifdef SOFTFLOAT_FOR_GCC -#include "softfloat-for-gcc.h" -#endif -#include "milieu.h" -#include "softfloat.h" - -#ifdef __weak_alias -__weak_alias(fpgetmask,_fpgetmask) -#endif - -fp_except -fpgetmask(void) -{ - - return float_exception_mask; -} diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/fpgetround.c b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/fpgetround.c deleted file mode 100644 index f97af7847105..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/fpgetround.c +++ /dev/null @@ -1,50 +0,0 @@ -/* NetBSD: fpgetround.c,v 1.3 2008/04/28 20:23:00 martin Exp */ - -/*- - * Copyright (c) 1997 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Neil A. Carson and Mark Brinicombe - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR 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 FOUNDATION 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 "namespace.h" - -#include -#ifdef SOFTFLOAT_FOR_GCC -#include "softfloat-for-gcc.h" -#endif -#include "milieu.h" -#include "softfloat.h" - -#ifdef __weak_alias -__weak_alias(fpgetround,_fpgetround) -#endif - -fp_rnd -fpgetround(void) -{ - - return float_rounding_mode; -} diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/fpgetsticky.c b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/fpgetsticky.c deleted file mode 100644 index ecd2c95d69c5..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/fpgetsticky.c +++ /dev/null @@ -1,50 +0,0 @@ -/* NetBSD: fpgetsticky.c,v 1.3 2008/04/28 20:23:00 martin Exp */ - -/*- - * Copyright (c) 1997 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Neil A. Carson and Mark Brinicombe - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR 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 FOUNDATION 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 "namespace.h" - -#include -#ifdef SOFTFLOAT_FOR_GCC -#include "softfloat-for-gcc.h" -#endif -#include "milieu.h" -#include "softfloat.h" - -#ifdef __weak_alias -__weak_alias(fpgetsticky,_fpgetsticky) -#endif - -fp_except -fpgetsticky(void) -{ - - return float_exception_flags; -} diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/fpsetmask.c b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/fpsetmask.c deleted file mode 100644 index c6d3b2f45647..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/fpsetmask.c +++ /dev/null @@ -1,53 +0,0 @@ -/* NetBSD: fpsetmask.c,v 1.4 2008/04/28 20:23:00 martin Exp */ - -/*- - * Copyright (c) 1997 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Neil A. Carson and Mark Brinicombe - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR 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 FOUNDATION 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 "namespace.h" - -#include -#ifdef SOFTFLOAT_FOR_GCC -#include "softfloat-for-gcc.h" -#endif -#include "milieu.h" -#include "softfloat.h" - -#ifdef __weak_alias -__weak_alias(fpsetmask,_fpsetmask) -#endif - -fp_except -fpsetmask(fp_except mask) -{ - fp_except old; - - old = float_exception_mask; - float_exception_mask = mask; - return old; -} diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/fpsetround.c b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/fpsetround.c deleted file mode 100644 index c062862f62ee..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/fpsetround.c +++ /dev/null @@ -1,53 +0,0 @@ -/* NetBSD: fpsetround.c,v 1.3 2008/04/28 20:23:00 martin Exp */ - -/*- - * Copyright (c) 1997 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Neil A. Carson and Mark Brinicombe - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR 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 FOUNDATION 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 "namespace.h" - -#include -#ifdef SOFTFLOAT_FOR_GCC -#include "softfloat-for-gcc.h" -#endif -#include "milieu.h" -#include "softfloat.h" - -#ifdef __weak_alias -__weak_alias(fpsetround,_fpsetround) -#endif - -fp_rnd -fpsetround(fp_rnd rnd_dir) -{ - fp_rnd old; - - old = float_rounding_mode; - float_rounding_mode = rnd_dir; - return old; -} diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/fpsetsticky.c b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/fpsetsticky.c deleted file mode 100644 index d0375aa779c3..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/fpsetsticky.c +++ /dev/null @@ -1,53 +0,0 @@ -/* NetBSD: fpsetsticky.c,v 1.3 2008/04/28 20:23:00 martin Exp */ - -/*- - * Copyright (c) 1997 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Neil A. Carson and Mark Brinicombe - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR 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 FOUNDATION 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 "namespace.h" - -#include -#ifdef SOFTFLOAT_FOR_GCC -#include "softfloat-for-gcc.h" -#endif -#include "milieu.h" -#include "softfloat.h" - -#ifdef __weak_alias -__weak_alias(fpsetsticky,_fpsetsticky) -#endif - -fp_except -fpsetsticky(fp_except except) -{ - fp_except old; - - old = float_exception_flags; - float_exception_flags = except; - return old; -} diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/gedf2.c b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/gedf2.c deleted file mode 100644 index 07c129b34bf5..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/gedf2.c +++ /dev/null @@ -1,19 +0,0 @@ -/* NetBSD: gedf2.c,v 1.1 2000/06/06 08:15:05 bjh21 Exp */ - -/* - * Written by Ben Harris, 2000. This file is in the Public Domain. - */ - -#include "softfloat-for-gcc.h" -#include "milieu.h" -#include "softfloat.h" - -flag __gedf2(float64, float64); - -flag -__gedf2(float64 a, float64 b) -{ - - /* libgcc1.c says (a >= b) - 1 */ - return float64_le(b, a) - 1; -} diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/gesf2.c b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/gesf2.c deleted file mode 100644 index bc366be7c883..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/gesf2.c +++ /dev/null @@ -1,19 +0,0 @@ -/* NetBSD: gesf2.c,v 1.1 2000/06/06 08:15:05 bjh21 Exp */ - -/* - * Written by Ben Harris, 2000. This file is in the Public Domain. - */ - -#include "softfloat-for-gcc.h" -#include "milieu.h" -#include "softfloat.h" - -flag __gesf2(float32, float32); - -flag -__gesf2(float32 a, float32 b) -{ - - /* libgcc1.c says (a >= b) - 1 */ - return float32_le(b, a) - 1; -} diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/gexf2.c b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/gexf2.c deleted file mode 100644 index a451c3e6df8b..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/gexf2.c +++ /dev/null @@ -1,22 +0,0 @@ -/* NetBSD: gexf2.c,v 1.2 2004/09/27 10:16:24 he Exp */ - -/* - * Written by Ben Harris, 2000. This file is in the Public Domain. - */ - -#include "softfloat-for-gcc.h" -#include "milieu.h" -#include "softfloat.h" - -#ifdef FLOATX80 - -flag __gexf2(floatx80, floatx80); - -flag -__gexf2(floatx80 a, floatx80 b) -{ - - /* libgcc1.c says (a >= b) - 1 */ - return floatx80_le(b, a) - 1; -} -#endif /* FLOATX80 */ diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/gtdf2.c b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/gtdf2.c deleted file mode 100644 index 2fcd12181262..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/gtdf2.c +++ /dev/null @@ -1,19 +0,0 @@ -/* NetBSD: gtdf2.c,v 1.1 2000/06/06 08:15:05 bjh21 Exp */ - -/* - * Written by Ben Harris, 2000. This file is in the Public Domain. - */ - -#include "softfloat-for-gcc.h" -#include "milieu.h" -#include "softfloat.h" - -flag __gtdf2(float64, float64); - -flag -__gtdf2(float64 a, float64 b) -{ - - /* libgcc1.c says a > b */ - return float64_lt(b, a); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/gtsf2.c b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/gtsf2.c deleted file mode 100644 index 918d8dca2455..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/gtsf2.c +++ /dev/null @@ -1,19 +0,0 @@ -/* NetBSD: gtsf2.c,v 1.1 2000/06/06 08:15:06 bjh21 Exp */ - -/* - * Written by Ben Harris, 2000. This file is in the Public Domain. - */ - -#include "softfloat-for-gcc.h" -#include "milieu.h" -#include "softfloat.h" - -flag __gtsf2(float32, float32); - -flag -__gtsf2(float32 a, float32 b) -{ - - /* libgcc1.c says a > b */ - return float32_lt(b, a); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/gtxf2.c b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/gtxf2.c deleted file mode 100644 index 246ceff39454..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/gtxf2.c +++ /dev/null @@ -1,22 +0,0 @@ -/* NetBSD: gtxf2.c,v 1.2 2004/09/27 10:16:24 he Exp */ - -/* - * Written by Ben Harris, 2000. This file is in the Public Domain. - */ - -#include "softfloat-for-gcc.h" -#include "milieu.h" -#include "softfloat.h" - -#ifdef FLOATX80 - -flag __gtxf2(floatx80, floatx80); - -flag -__gtxf2(floatx80 a, floatx80 b) -{ - - /* libgcc1.c says a > b */ - return floatx80_lt(b, a); -} -#endif /* FLOATX80 */ diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/ledf2.c b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/ledf2.c deleted file mode 100644 index d5e5b7214754..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/ledf2.c +++ /dev/null @@ -1,19 +0,0 @@ -/* NetBSD: ledf2.c,v 1.1 2000/06/06 08:15:06 bjh21 Exp */ - -/* - * Written by Ben Harris, 2000. This file is in the Public Domain. - */ - -#include "softfloat-for-gcc.h" -#include "milieu.h" -#include "softfloat.h" - -flag __ledf2(float64, float64); - -flag -__ledf2(float64 a, float64 b) -{ - - /* libgcc1.c says 1 - (a <= b) */ - return 1 - float64_le(a, b); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/lesf2.c b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/lesf2.c deleted file mode 100644 index 6210f87b93c1..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/lesf2.c +++ /dev/null @@ -1,19 +0,0 @@ -/* NetBSD: lesf2.c,v 1.1 2000/06/06 08:15:06 bjh21 Exp */ - -/* - * Written by Ben Harris, 2000. This file is in the Public Domain. - */ - -#include "softfloat-for-gcc.h" -#include "milieu.h" -#include "softfloat.h" - -flag __lesf2(float32, float32); - -flag -__lesf2(float32 a, float32 b) -{ - - /* libgcc1.c says 1 - (a <= b) */ - return 1 - float32_le(a, b); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/ltdf2.c b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/ltdf2.c deleted file mode 100644 index 6caba3fb884d..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/ltdf2.c +++ /dev/null @@ -1,19 +0,0 @@ -/* NetBSD: ltdf2.c,v 1.1 2000/06/06 08:15:06 bjh21 Exp */ - -/* - * Written by Ben Harris, 2000. This file is in the Public Domain. - */ - -#include "softfloat-for-gcc.h" -#include "milieu.h" -#include "softfloat.h" - -flag __ltdf2(float64, float64); - -flag -__ltdf2(float64 a, float64 b) -{ - - /* libgcc1.c says -(a < b) */ - return -float64_lt(a, b); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/ltsf2.c b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/ltsf2.c deleted file mode 100644 index 7f1a4e84e317..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/ltsf2.c +++ /dev/null @@ -1,19 +0,0 @@ -/* NetBSD: ltsf2.c,v 1.1 2000/06/06 08:15:06 bjh21 Exp */ - -/* - * Written by Ben Harris, 2000. This file is in the Public Domain. - */ - -#include "softfloat-for-gcc.h" -#include "milieu.h" -#include "softfloat.h" - -flag __ltsf2(float32, float32); - -flag -__ltsf2(float32 a, float32 b) -{ - - /* libgcc1.c says -(a < b) */ - return -float32_lt(a, b); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/namespace.h b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/namespace.h deleted file mode 100644 index 5665eec6e359..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/namespace.h +++ /dev/null @@ -1,8 +0,0 @@ -#include "ieeefp.h" - -fp_rnd fpgetround(void); -fp_rnd fpsetround(fp_rnd); -fp_except fpgetmask(void); -fp_except fpsetmask(fp_except); -fp_except fpgetsticky(void); -fp_except fpsetsticky(fp_except); diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/nedf2.c b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/nedf2.c deleted file mode 100644 index fecde2bfd811..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/nedf2.c +++ /dev/null @@ -1,19 +0,0 @@ -/* NetBSD: nedf2.c,v 1.1 2000/06/06 08:15:07 bjh21 Exp */ - -/* - * Written by Ben Harris, 2000. This file is in the Public Domain. - */ - -#include "softfloat-for-gcc.h" -#include "milieu.h" -#include "softfloat.h" - -flag __nedf2(float64, float64); - -flag -__nedf2(float64 a, float64 b) -{ - - /* libgcc1.c says a != b */ - return !float64_eq(a, b); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/negdf2.c b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/negdf2.c deleted file mode 100644 index 7b2835d8dc59..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/negdf2.c +++ /dev/null @@ -1,19 +0,0 @@ -/* NetBSD: negdf2.c,v 1.1 2000/06/06 08:15:07 bjh21 Exp */ - -/* - * Written by Ben Harris, 2000. This file is in the Public Domain. - */ - -#include "softfloat-for-gcc.h" -#include "milieu.h" -#include "softfloat.h" - -float64 __negdf2(float64); - -float64 -__negdf2(float64 a) -{ - - /* libgcc1.c says -a */ - return a ^ FLOAT64_MANGLE(0x8000000000000000ULL); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/negsf2.c b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/negsf2.c deleted file mode 100644 index b01b9c6f08bb..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/negsf2.c +++ /dev/null @@ -1,19 +0,0 @@ -/* NetBSD: negsf2.c,v 1.1 2000/06/06 08:15:07 bjh21 Exp */ - -/* - * Written by Ben Harris, 2000. This file is in the Public Domain. - */ - -#include "softfloat-for-gcc.h" -#include "milieu.h" -#include "softfloat.h" - -float32 __negsf2(float32); - -float32 -__negsf2(float32 a) -{ - - /* libgcc1.c says INTIFY(-a) */ - return a ^ 0x80000000; -} diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/negxf2.c b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/negxf2.c deleted file mode 100644 index aef7f602b956..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/negxf2.c +++ /dev/null @@ -1,22 +0,0 @@ -/* NetBSD: negxf2.c,v 1.2 2004/09/27 10:16:24 he Exp */ - -/* - * Written by Ben Harris, 2000. This file is in the Public Domain. - */ - -#include "softfloat-for-gcc.h" -#include "milieu.h" -#include "softfloat.h" - -#ifdef FLOATX80 - -floatx80 __negxf2(floatx80); - -floatx80 -__negxf2(floatx80 a) -{ - - /* libgcc1.c says -a */ - return __mulxf3(a,__floatsixf(-1)); -} -#endif /* FLOATX80 */ diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/nesf2.c b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/nesf2.c deleted file mode 100644 index d311cb3987eb..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/nesf2.c +++ /dev/null @@ -1,19 +0,0 @@ -/* NetBSD: nesf2.c,v 1.1 2000/06/06 08:15:07 bjh21 Exp */ - -/* - * Written by Ben Harris, 2000. This file is in the Public Domain. - */ - -#include "softfloat-for-gcc.h" -#include "milieu.h" -#include "softfloat.h" - -flag __nesf2(float32, float32); - -flag -__nesf2(float32 a, float32 b) -{ - - /* libgcc1.c says a != b */ - return !float32_eq(a, b); -} diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/nexf2.c b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/nexf2.c deleted file mode 100644 index 36c071d89467..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/nexf2.c +++ /dev/null @@ -1,22 +0,0 @@ -/* NetBSD: nexf2.c,v 1.2 2004/09/27 10:16:24 he Exp */ - -/* - * Written by Ben Harris, 2000. This file is in the Public Domain. - */ - -#include "softfloat-for-gcc.h" -#include "milieu.h" -#include "softfloat.h" - -#ifdef FLOATX80 - -flag __nexf2(floatx80, floatx80); - -flag -__nexf2(floatx80 a, floatx80 b) -{ - - /* libgcc1.c says a != b */ - return !floatx80_eq(a, b); -} -#endif /* FLOATX80 */ diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/softfloat-for-gcc.h b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/softfloat-for-gcc.h deleted file mode 100644 index 29824526b561..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/softfloat-for-gcc.h +++ /dev/null @@ -1,58 +0,0 @@ -/* NetBSD: softfloat-for-gcc.h,v 1.7 2004/09/26 21:13:27 jmmv Exp */ - -/* - * Move private identifiers with external linkage into implementation - * namespace. -- Klaus Klein , May 5, 1999 - */ -#define float_exception_flags _softfloat_float_exception_flags -#define float_exception_mask _softfloat_float_exception_mask -#define float_rounding_mode _softfloat_float_rounding_mode -#define float_raise _softfloat_float_raise -/* The following batch are called by GCC through wrappers */ -#define float32_eq _softfloat_float32_eq -#define float32_le _softfloat_float32_le -#define float32_lt _softfloat_float32_lt -#define float64_eq _softfloat_float64_eq -#define float64_le _softfloat_float64_le -#define float64_lt _softfloat_float64_lt - -/* - * Macros to define functions with the GCC expected names - */ - -#define float32_add __addsf3 -#define float64_add __adddf3 -#define floatx80_add __addxf3 -#define float32_sub __subsf3 -#define float64_sub __subdf3 -#define floatx80_sub __subxf3 -#define float32_mul __mulsf3 -#define float64_mul __muldf3 -#define floatx80_mul __mulxf3 -#define float32_div __divsf3 -#define float64_div __divdf3 -#define floatx80_div __divxf3 -#define int32_to_float32 __floatsisf -#define int32_to_float64 __floatsidf -#define int32_to_floatx80 __floatsixf -#define int64_to_float32 __floatdisf -#define int64_to_float64 __floatdidf -#define int64_to_floatx80 __floatdixf -#define float32_to_int32_round_to_zero __fixsfsi -#define float64_to_int32_round_to_zero __fixdfsi -#define floatx80_to_int32_round_to_zero __fixxfsi -#define float32_to_int64_round_to_zero __fixsfdi -#define float64_to_int64_round_to_zero __fixdfdi -#define floatx80_to_int64_round_to_zero __fixxfdi -#define float32_to_uint32_round_to_zero __fixunssfsi -#define float64_to_uint32_round_to_zero __fixunsdfsi -#define float32_to_float64 __extendsfdf2 -#define float64_to_floatx80 __extenddfxf2 -#define float32_to_floatx80 __extendsfxf2 -#define float64_to_float32 __truncdfsf2 -#define floatx80_to_float64 __truncxfdf2 -#define floatx80_to_float32 __truncxfsf2 - -#define floatx80_lt __ltxf2 -#define floatx80_eq __eqxf2 -#define floatx80_le __lexf2 diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/softfloat-history.txt b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/softfloat-history.txt deleted file mode 100644 index b403106fdc94..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/softfloat-history.txt +++ /dev/null @@ -1,52 +0,0 @@ -NetBSD: softfloat-history.txt,v 1.1 2000/06/06 08:15:08 bjh21 Exp - -History of Major Changes to SoftFloat, up to Release 2a - -John R. Hauser -1998 December 16 - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Release 2a (1998 December) - --- Added functions to convert between 64-bit integers (int64) and all - supported floating-point formats. - --- Fixed a bug in all 64-bit-version square root functions except - `float32_sqrt' that caused the result sometimes to be off by 1 unit in - the last place (1 ulp) from what it should be. (Bug discovered by Paul - Donahue.) - --- Improved the makefiles. - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Release 2 (1997 June) - --- Created the 64-bit (bits64) version, adding the floatx80 and float128 - formats. - --- Changed the source directory structure, splitting the sources into a - `bits32' and a `bits64' version. Renamed `environment.h' to `milieu.h' - (to avoid confusion with environment variables). - --- Fixed a small error that caused `float64_round_to_int' often to round the - wrong way in nearest/even mode when the operand was between 2^20 and 2^21 - and halfway between two integers. - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Release 1a (1996 July) - --- Corrected a mistake that caused borderline underflow cases not to raise - the underflow flag when they should have. (Problem reported by Doug - Priest.) - --- Added the `float_detect_tininess' variable to control whether tininess is - detected before or after rounding. - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Release 1 (1996 July) - --- Original release. - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/softfloat-source.txt b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/softfloat-source.txt deleted file mode 100644 index a3406890e87f..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/softfloat-source.txt +++ /dev/null @@ -1,383 +0,0 @@ -NetBSD: softfloat-source.txt,v 1.2 2006/11/24 19:46:58 christos Exp - -SoftFloat Release 2a Source Documentation - -John R. Hauser -1998 December 14 - - -------------------------------------------------------------------------------- -Introduction - -SoftFloat is a software implementation of floating-point that conforms to -the IEC/IEEE Standard for Binary Floating-Point Arithmetic. SoftFloat can -support four floating-point formats: single precision, double precision, -extended double precision, and quadruple precision. All operations required -by the IEEE Standard are implemented, except for conversions to and from -decimal. SoftFloat is distributed in the form of C source code, so a -C compiler is needed to compile the code. Support for the extended double- -precision and quadruple-precision formats is dependent on the C compiler -implementing a 64-bit integer type. - -This document gives information needed for compiling and/or porting -SoftFloat. - -The source code for SoftFloat is intended to be relatively machine- -independent and should be compilable using any ISO/ANSI C compiler. At the -time of this writing, SoftFloat has been successfully compiled with the GNU -C Compiler (`gcc') for several platforms. - - -------------------------------------------------------------------------------- -Limitations - -SoftFloat as written requires an ISO/ANSI-style C compiler. No attempt has -been made to accommodate compilers that are not ISO-conformant. Older ``K&R- -style'' compilers are not adequate for compiling SoftFloat. All testing I -have done so far has been with the GNU C Compiler. Compilation with other -compilers should be possible but has not been tested. - -The SoftFloat sources assume that source code file names can be longer than -8 characters. In order to compile under an MS-DOS-type system, many of the -source files will need to be renamed, and the source and makefiles edited -appropriately. Once compiled, the SoftFloat binary does not depend on the -existence of long file names. - -The underlying machine is assumed to be binary with a word size that is a -power of 2. Bytes are 8 bits. Support for the extended double-precision -and quadruple-precision formats depends on the C compiler implementing -a 64-bit integer type. If the largest integer type supported by the -C compiler is 32 bits, SoftFloat is limited to the single- and double- -precision formats. - - -------------------------------------------------------------------------------- -Contents - - Introduction - Limitations - Contents - Legal Notice - SoftFloat Source Directory Structure - SoftFloat Source Files - processors/*.h - softfloat/bits*/*/softfloat.h - softfloat/bits*/*/milieu.h - softfloat/bits*/*/softfloat-specialize - softfloat/bits*/softfloat-macros - softfloat/bits*/softfloat.c - Steps to Creating a `softfloat.o' - Making `softfloat.o' a Library - Testing SoftFloat - Timing SoftFloat - Compiler Options and Efficiency - Processor-Specific Optimization of `softfloat.c' Using `softfloat-macros' - Contact Information - - - -------------------------------------------------------------------------------- -Legal Notice - -SoftFloat was written by John R. Hauser. This work was made possible in -part by the International Computer Science Institute, located at Suite 600, -1947 Center Street, Berkeley, California 94704. Funding was partially -provided by the National Science Foundation under grant MIP-9311980. The -original version of this code was written as part of a project to build -a fixed-point vector processor in collaboration with the University of -California at Berkeley, overseen by Profs. Nelson Morgan and John Wawrzynek. - -THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. - - -------------------------------------------------------------------------------- -SoftFloat Source Directory Structure - -Because SoftFloat is targeted to multiple platforms, its source code -is slightly scattered between target-specific and target-independent -directories and files. The directory structure is as follows: - - processors - softfloat - bits64 - templates - 386-Win32-gcc - SPARC-Solaris-gcc - bits32 - templates - 386-Win32-gcc - SPARC-Solaris-gcc - -The two topmost directories and their contents are: - - softfloat - Most of the source code needed for SoftFloat. - processors - Target-specific header files that are not specific to - SoftFloat. - -The `softfloat' directory is further split into two parts: - - bits64 - SoftFloat implementation using 64-bit integers. - bits32 - SoftFloat implementation using only 32-bit integers. - -Within these directories are subdirectories for each of the targeted -platforms. The SoftFloat source code is distributed with targets -`386-Win32-gcc' and `SPARC-Solaris-gcc' (and perhaps others) already -prepared for both the 32-bit and 64-bit implementations. Source files that -are not within these target-specific subdirectories are intended to be -target-independent. - -The naming convention used for the target-specific directories is -`--'. The names of the supplied -target directories should be interpreted as follows: - - : - 386 - Intel 386-compatible processor. - SPARC - SPARC processor (as used by Sun machines). - : - Win32 - Microsoft Win32 executable. - Solaris - Sun Solaris executable. - : - gcc - GNU C Compiler. - -You do not need to maintain this convention if you do not want to. - -Alongside the supplied target-specific directories is a `templates' -directory containing a set of ``generic'' target-specific source files. A -new target directory can be created by copying the `templates' directory and -editing the files inside. (Complete instructions for porting SoftFloat to a -new target are in the section _Steps_to_Creating_a_`softfloat.o'_.) Note -that the `templates' directory will not work as a target directory without -some editing. To avoid confusion, it would be wise to refrain from editing -the files inside `templates' directly. - - -------------------------------------------------------------------------------- -SoftFloat Source Files - -The purpose of each source file is described below. In the following, -the `*' symbol is used in place of the name of a specific target, such as -`386-Win32-gcc' or `SPARC-Solaris-gcc', or in place of some other text, as -in `bits*' for either `bits32' or `bits64'. - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -processors/*.h - -The target-specific `processors' header file defines integer types -of various sizes, and also defines certain C preprocessor macros that -characterize the target. The two examples supplied are `386-gcc.h' and -`SPARC-gcc.h'. The naming convention used for processor header files is -`-.h'. - -If 64-bit integers are supported by the compiler, the macro name `BITS64' -should be defined here along with the corresponding 64-bit integer -types. In addition, the function-like macro `LIT64' must be defined for -constructing 64-bit integer literals (constants). The `LIT64' macro is used -consistently in the SoftFloat code to annotate 64-bit literals. - -If `BITS64' is not defined, only the 32-bit version of SoftFloat can be -compiled. If `BITS64' _is_ defined, either can be compiled. - -If an inlining attribute (such as an `inline' keyword) is provided by the -compiler, the macro `INLINE' should be defined to the appropriate keyword. -If not, `INLINE' can be set to the keyword `static'. The `INLINE' macro -appears in the SoftFloat source code before every function that should -be inlined by the compiler. SoftFloat depends on inlining to obtain -good speed. Even if inlining cannot be forced with a language keyword, -the compiler may still be able to perform inlining on its own as an -optimization. If a command-line option is needed to convince the compiler -to perform this optimization, this should be assured in the makefile. (See -the section _Compiler_Options_and_Efficiency_ below.) - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -softfloat/bits*/*/softfloat.h - -The target-specific `softfloat.h' header file defines the SoftFloat -interface as seen by clients. - -Unlike the actual function definitions in `softfloat.c', the declarations -in `softfloat.h' do not use any of the types defined by the `processors' -header file. This is done so that clients will not have to include the -`processors' header file in order to use SoftFloat. Nevertheless, the -target-specific declarations in `softfloat.h' must match what `softfloat.c' -expects. For example, if `int32' is defined as `int' in the `processors' -header file, then in `softfloat.h' the output of `float32_to_int32' should -be stated as `int', although in `softfloat.c' it is given in target- -independent form as `int32'. - -For the `bits64' implementation of SoftFloat, the macro names `FLOATX80' and -`FLOAT128' must be defined in order for the extended double-precision and -quadruple-precision formats to be enabled in the code. Conversely, either -or both of the extended formats can be disabled by simply removing the -`#define' of the respective macro. When an extended format is not enabled, -none of the functions that either input or output the format are defined, -and no space is taken up in `softfloat.o' by such functions. There is no -provision for disabling the usual single- and double-precision formats. - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -softfloat/bits*/*/milieu.h - -The target-specific `milieu.h' header file provides declarations that are -needed to compile SoftFloat. In addition, deviations from ISO/ANSI C by -the compiler (such as names not properly declared in system header files) -are corrected in this header if possible. - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -softfloat/bits*/*/softfloat-specialize - -This target-specific C source fragment defines: - --- whether tininess for underflow is detected before or after rounding by - default; --- what (if anything) special happens when exceptions are raised; --- how signaling NaNs are distinguished from quiet NaNs; --- the default generated quiet NaNs; and --- how NaNs are propagated from function inputs to output. - -These details are not decided by the IEC/IEEE Standard. This fragment is -included verbatim within `softfloat.c' when SoftFloat is compiled. - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -softfloat/bits*/softfloat-macros - -This target-independent C source fragment defines a number of arithmetic -functions used as primitives within the `softfloat.c' source. Most of the -functions defined here are intended to be inlined for efficiency. This -fragment is included verbatim within `softfloat.c' when SoftFloat is -compiled. - -Target-specific variations on this file are possible. See the section -_Processor-Specific_Optimization_of_`softfloat.c'_Using_`softfloat-macros'_ -below. - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -softfloat/bits*/softfloat.c - -The target-independent `softfloat.c' source file contains the body of the -SoftFloat implementation. - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -The inclusion of the files above within each other (using `#include') can be -shown graphically as follows: - - softfloat/bits*/softfloat.c - softfloat/bits*/*/milieu.h - processors/*.h - softfloat/bits*/*/softfloat.h - softfloat/bits*/*/softfloat-specialize - softfloat/bits*/softfloat-macros - -Note in particular that `softfloat.c' does not include the `processors' -header file directly. Rather, `softfloat.c' includes the target-specific -`milieu.h' header file, which in turn includes the processor header file. - - -------------------------------------------------------------------------------- -Steps to Creating a `softfloat.o' - -Porting and/or compiling SoftFloat involves the following steps: - -1. If one does not already exist, create an appropriate `.h' file in the - `processors' directory. - -2. If `BITS64' is defined in the `processors' header file, choose whether - to compile the 32-bit or 64-bit implementation of SoftFloat. If - `BITS64' is not defined, your only choice is the 32-bit implementation. - The remaining steps occur within either the `bits32' or `bits64' - subdirectories. - -3. If one does not already exist, create an appropriate target-specific - subdirectory by copying the given `templates' directory. - -4. In the target-specific subdirectory, edit the files `softfloat-specialize' - and `softfloat.h' to define the desired exception handling functions - and mode control values. In the `softfloat.h' header file, ensure also - that all declarations give the proper target-specific type (such as - `int' or `long') corresponding to the target-independent type used in - `softfloat.c' (such as `int32'). None of the type names declared in the - `processors' header file should appear in `softfloat.h'. - -5. In the target-specific subdirectory, edit the files `milieu.h' and - `Makefile' to reflect the current environment. - -6. In the target-specific subdirectory, execute `make'. - -For the targets that are supplied, if the expected compiler is available -(usually `gcc'), it should only be necessary to execute `make' in the -target-specific subdirectory. - - -------------------------------------------------------------------------------- -Making `softfloat.o' a Library - -SoftFloat is not made into a software library by the supplied makefile. -If desired, `softfloat.o' can easily be put into its own library (in Unix, -`softfloat.a') using the usual system tool (in Unix, `ar'). - - -------------------------------------------------------------------------------- -Testing SoftFloat - -SoftFloat can be tested using the `testsoftfloat' program by the same -author. The `testsoftfloat' program is part of the TestFloat package -available at the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/ -TestFloat.html'. - - -------------------------------------------------------------------------------- -Timing SoftFloat - -A program called `timesoftfloat' for timing the SoftFloat functions is -included with the SoftFloat source code. Compiling `timesoftfloat' should -pose no difficulties once `softfloat.o' exists. The supplied makefile -will create a `timesoftfloat' executable by default after generating -`softfloat.o'. See `timesoftfloat.txt' for documentation about using -`timesoftfloat'. - - -------------------------------------------------------------------------------- -Compiler Options and Efficiency - -In order to get good speed with SoftFloat, it is important that the compiler -inline the routines that have been marked `INLINE' in the code. Even if -inlining cannot be forced by an appropriate definition of the `INLINE' -macro, the compiler may still be able to perform inlining on its own as -an optimization. In that case, the makefile should be edited to give the -compiler whatever option is required to cause it to inline small functions. - -The ability of the processor to do fast shifts has been assumed. Efficiency -will not be as good on processors for which this is not the case (such as -the original Motorola 68000 or Intel 8086 processors). - - -------------------------------------------------------------------------------- -Processor-Specific Optimization of `softfloat.c' Using `softfloat-macros' - -The `softfloat-macros' source fragment defines arithmetic functions used -as primitives by `softfloat.c'. This file has been written in a target- -independent form. For a given target, it may be possible to improve on -these functions using target-specific and/or non-ISO-C features (such -as `asm' statements). For example, one of the ``macro'' functions takes -two word-size integers and returns their full product in two words. -This operation can be done directly in hardware on many processors; but -because it is not available through standard C, the function defined in -`softfloat-macros' uses four multiplies to achieve the same result. - -To address these shortcomings, a customized version of `softfloat-macros' -can be created in any of the target-specific subdirectories. A simple -modification to the target's makefile should be sufficient to ensure that -the custom version is used instead of the generic one. - - -------------------------------------------------------------------------------- -Contact Information - -At the time of this writing, the most up-to-date information about -SoftFloat and the latest release can be found at the Web page `http:// -HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/SoftFloat.html'. - - diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/softfloat-specialize b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/softfloat-specialize deleted file mode 100644 index 99f847bd457b..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/softfloat-specialize +++ /dev/null @@ -1,491 +0,0 @@ -/* NetBSD: softfloat-specialize,v 1.4 2004/09/26 21:13:27 jmmv Exp */ - -/* This is a derivative work. */ - -/* -=============================================================================== - -This C source fragment is part of the SoftFloat IEC/IEEE Floating-point -Arithmetic Package, Release 2a. - -Written by John R. Hauser. This work was made possible in part by the -International Computer Science Institute, located at Suite 600, 1947 Center -Street, Berkeley, California 94704. Funding was partially provided by the -National Science Foundation under grant MIP-9311980. The original version -of this code was written as part of a project to build a fixed-point vector -processor in collaboration with the University of California at Berkeley, -overseen by Profs. Nelson Morgan and John Wawrzynek. More information -is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ -arithmetic/SoftFloat.html'. - -THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. - -Derivative works are acceptable, even for commercial purposes, so long as -(1) they include prominent notice that the work is derivative, and (2) they -include prominent notice akin to these four paragraphs for those parts of -this code that are retained. - -=============================================================================== -*/ - -#include - -/* -------------------------------------------------------------------------------- -Underflow tininess-detection mode, statically initialized to default value. -(The declaration in `softfloat.h' must match the `int8' type here.) -------------------------------------------------------------------------------- -*/ -#ifdef SOFTFLOAT_FOR_GCC -static -#endif -int8 float_detect_tininess = float_tininess_after_rounding; - -/* -------------------------------------------------------------------------------- -Raises the exceptions specified by `flags'. Floating-point traps can be -defined here if desired. It is currently not possible for such a trap to -substitute a result value. If traps are not implemented, this routine -should be simply `float_exception_flags |= flags;'. -------------------------------------------------------------------------------- -*/ -fp_except float_exception_mask = 0; -void float_raise( fp_except flags ) -{ - - float_exception_flags |= flags; - - if ( flags & float_exception_mask ) { - raise( SIGFPE ); - } -} - -/* -------------------------------------------------------------------------------- -Internal canonical NaN format. -------------------------------------------------------------------------------- -*/ -typedef struct { - flag sign; - bits64 high, low; -} commonNaNT; - -/* -------------------------------------------------------------------------------- -The pattern for a default generated single-precision NaN. -------------------------------------------------------------------------------- -*/ -#define float32_default_nan 0xFFFFFFFF - -/* -------------------------------------------------------------------------------- -Returns 1 if the single-precision floating-point value `a' is a NaN; -otherwise returns 0. -------------------------------------------------------------------------------- -*/ -#ifdef SOFTFLOAT_FOR_GCC -static -#endif -flag float32_is_nan( float32 a ) -{ - - return ( 0xFF000000 < (bits32) ( a<<1 ) ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the single-precision floating-point value `a' is a signaling -NaN; otherwise returns 0. -------------------------------------------------------------------------------- -*/ -#if defined(SOFTFLOAT_FOR_GCC) && !defined(SOFTFLOATSPARC64_FOR_GCC) && \ - !defined(SOFTFLOAT_M68K_FOR_GCC) -static -#endif -flag float32_is_signaling_nan( float32 a ) -{ - - return ( ( ( a>>22 ) & 0x1FF ) == 0x1FE ) && ( a & 0x003FFFFF ); - -} - -/* -------------------------------------------------------------------------------- -Returns the result of converting the single-precision floating-point NaN -`a' to the canonical NaN format. If `a' is a signaling NaN, the invalid -exception is raised. -------------------------------------------------------------------------------- -*/ -static commonNaNT float32ToCommonNaN( float32 a ) -{ - commonNaNT z; - - if ( float32_is_signaling_nan( a ) ) float_raise( float_flag_invalid ); - z.sign = a>>31; - z.low = 0; - z.high = ( (bits64) a )<<41; - return z; - -} - -/* -------------------------------------------------------------------------------- -Returns the result of converting the canonical NaN `a' to the single- -precision floating-point format. -------------------------------------------------------------------------------- -*/ -static float32 commonNaNToFloat32( commonNaNT a ) -{ - - return ( ( (bits32) a.sign )<<31 ) | 0x7FC00000 | ( a.high>>41 ); - -} - -/* -------------------------------------------------------------------------------- -Takes two single-precision floating-point values `a' and `b', one of which -is a NaN, and returns the appropriate NaN result. If either `a' or `b' is a -signaling NaN, the invalid exception is raised. -------------------------------------------------------------------------------- -*/ -static float32 propagateFloat32NaN( float32 a, float32 b ) -{ - flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN; - - aIsNaN = float32_is_nan( a ); - aIsSignalingNaN = float32_is_signaling_nan( a ); - bIsNaN = float32_is_nan( b ); - bIsSignalingNaN = float32_is_signaling_nan( b ); - a |= 0x00400000; - b |= 0x00400000; - if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise( float_flag_invalid ); - if ( aIsNaN ) { - return ( aIsSignalingNaN & bIsNaN ) ? b : a; - } - else { - return b; - } - -} - -/* -------------------------------------------------------------------------------- -The pattern for a default generated double-precision NaN. -------------------------------------------------------------------------------- -*/ -#define float64_default_nan LIT64( 0xFFFFFFFFFFFFFFFF ) - -/* -------------------------------------------------------------------------------- -Returns 1 if the double-precision floating-point value `a' is a NaN; -otherwise returns 0. -------------------------------------------------------------------------------- -*/ -#ifdef SOFTFLOAT_FOR_GCC -static -#endif -flag float64_is_nan( float64 a ) -{ - - return ( LIT64( 0xFFE0000000000000 ) < - (bits64) ( FLOAT64_DEMANGLE(a)<<1 ) ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the double-precision floating-point value `a' is a signaling -NaN; otherwise returns 0. -------------------------------------------------------------------------------- -*/ -#if defined(SOFTFLOAT_FOR_GCC) && !defined(SOFTFLOATSPARC64_FOR_GCC) && \ - !defined(SOFTFLOATM68K_FOR_GCC) -static -#endif -flag float64_is_signaling_nan( float64 a ) -{ - - return - ( ( ( FLOAT64_DEMANGLE(a)>>51 ) & 0xFFF ) == 0xFFE ) - && ( FLOAT64_DEMANGLE(a) & LIT64( 0x0007FFFFFFFFFFFF ) ); - -} - -/* -------------------------------------------------------------------------------- -Returns the result of converting the double-precision floating-point NaN -`a' to the canonical NaN format. If `a' is a signaling NaN, the invalid -exception is raised. -------------------------------------------------------------------------------- -*/ -static commonNaNT float64ToCommonNaN( float64 a ) -{ - commonNaNT z; - - if ( float64_is_signaling_nan( a ) ) float_raise( float_flag_invalid ); - z.sign = FLOAT64_DEMANGLE(a)>>63; - z.low = 0; - z.high = FLOAT64_DEMANGLE(a)<<12; - return z; - -} - -/* -------------------------------------------------------------------------------- -Returns the result of converting the canonical NaN `a' to the double- -precision floating-point format. -------------------------------------------------------------------------------- -*/ -static float64 commonNaNToFloat64( commonNaNT a ) -{ - - return FLOAT64_MANGLE( - ( ( (bits64) a.sign )<<63 ) - | LIT64( 0x7FF8000000000000 ) - | ( a.high>>12 ) ); - -} - -/* -------------------------------------------------------------------------------- -Takes two double-precision floating-point values `a' and `b', one of which -is a NaN, and returns the appropriate NaN result. If either `a' or `b' is a -signaling NaN, the invalid exception is raised. -------------------------------------------------------------------------------- -*/ -static float64 propagateFloat64NaN( float64 a, float64 b ) -{ - flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN; - - aIsNaN = float64_is_nan( a ); - aIsSignalingNaN = float64_is_signaling_nan( a ); - bIsNaN = float64_is_nan( b ); - bIsSignalingNaN = float64_is_signaling_nan( b ); - a |= FLOAT64_MANGLE(LIT64( 0x0008000000000000 )); - b |= FLOAT64_MANGLE(LIT64( 0x0008000000000000 )); - if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise( float_flag_invalid ); - if ( aIsNaN ) { - return ( aIsSignalingNaN & bIsNaN ) ? b : a; - } - else { - return b; - } - -} - -#ifdef FLOATX80 - -/* -------------------------------------------------------------------------------- -The pattern for a default generated extended double-precision NaN. The -`high' and `low' values hold the most- and least-significant bits, -respectively. -------------------------------------------------------------------------------- -*/ -#define floatx80_default_nan_high 0xFFFF -#define floatx80_default_nan_low LIT64( 0xFFFFFFFFFFFFFFFF ) - -/* -------------------------------------------------------------------------------- -Returns 1 if the extended double-precision floating-point value `a' is a -NaN; otherwise returns 0. -------------------------------------------------------------------------------- -*/ -flag floatx80_is_nan( floatx80 a ) -{ - - return ( ( a.high & 0x7FFF ) == 0x7FFF ) && (bits64) ( a.low<<1 ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the extended double-precision floating-point value `a' is a -signaling NaN; otherwise returns 0. -------------------------------------------------------------------------------- -*/ -flag floatx80_is_signaling_nan( floatx80 a ) -{ - bits64 aLow; - - aLow = a.low & ~ LIT64( 0x4000000000000000 ); - return - ( ( a.high & 0x7FFF ) == 0x7FFF ) - && (bits64) ( aLow<<1 ) - && ( a.low == aLow ); - -} - -/* -------------------------------------------------------------------------------- -Returns the result of converting the extended double-precision floating- -point NaN `a' to the canonical NaN format. If `a' is a signaling NaN, the -invalid exception is raised. -------------------------------------------------------------------------------- -*/ -static commonNaNT floatx80ToCommonNaN( floatx80 a ) -{ - commonNaNT z; - - if ( floatx80_is_signaling_nan( a ) ) float_raise( float_flag_invalid ); - z.sign = a.high>>15; - z.low = 0; - z.high = a.low<<1; - return z; - -} - -/* -------------------------------------------------------------------------------- -Returns the result of converting the canonical NaN `a' to the extended -double-precision floating-point format. -------------------------------------------------------------------------------- -*/ -static floatx80 commonNaNToFloatx80( commonNaNT a ) -{ - floatx80 z; - - z.low = LIT64( 0xC000000000000000 ) | ( a.high>>1 ); - z.high = ( ( (bits16) a.sign )<<15 ) | 0x7FFF; - return z; - -} - -/* -------------------------------------------------------------------------------- -Takes two extended double-precision floating-point values `a' and `b', one -of which is a NaN, and returns the appropriate NaN result. If either `a' or -`b' is a signaling NaN, the invalid exception is raised. -------------------------------------------------------------------------------- -*/ -static floatx80 propagateFloatx80NaN( floatx80 a, floatx80 b ) -{ - flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN; - - aIsNaN = floatx80_is_nan( a ); - aIsSignalingNaN = floatx80_is_signaling_nan( a ); - bIsNaN = floatx80_is_nan( b ); - bIsSignalingNaN = floatx80_is_signaling_nan( b ); - a.low |= LIT64( 0xC000000000000000 ); - b.low |= LIT64( 0xC000000000000000 ); - if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise( float_flag_invalid ); - if ( aIsNaN ) { - return ( aIsSignalingNaN & bIsNaN ) ? b : a; - } - else { - return b; - } - -} - -#endif - -#ifdef FLOAT128 - -/* -------------------------------------------------------------------------------- -The pattern for a default generated quadruple-precision NaN. The `high' and -`low' values hold the most- and least-significant bits, respectively. -------------------------------------------------------------------------------- -*/ -#define float128_default_nan_high LIT64( 0xFFFFFFFFFFFFFFFF ) -#define float128_default_nan_low LIT64( 0xFFFFFFFFFFFFFFFF ) - -/* -------------------------------------------------------------------------------- -Returns 1 if the quadruple-precision floating-point value `a' is a NaN; -otherwise returns 0. -------------------------------------------------------------------------------- -*/ -flag float128_is_nan( float128 a ) -{ - - return - ( LIT64( 0xFFFE000000000000 ) <= (bits64) ( a.high<<1 ) ) - && ( a.low || ( a.high & LIT64( 0x0000FFFFFFFFFFFF ) ) ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the quadruple-precision floating-point value `a' is a -signaling NaN; otherwise returns 0. -------------------------------------------------------------------------------- -*/ -flag float128_is_signaling_nan( float128 a ) -{ - - return - ( ( ( a.high>>47 ) & 0xFFFF ) == 0xFFFE ) - && ( a.low || ( a.high & LIT64( 0x00007FFFFFFFFFFF ) ) ); - -} - -/* -------------------------------------------------------------------------------- -Returns the result of converting the quadruple-precision floating-point NaN -`a' to the canonical NaN format. If `a' is a signaling NaN, the invalid -exception is raised. -------------------------------------------------------------------------------- -*/ -static commonNaNT float128ToCommonNaN( float128 a ) -{ - commonNaNT z; - - if ( float128_is_signaling_nan( a ) ) float_raise( float_flag_invalid ); - z.sign = a.high>>63; - shortShift128Left( a.high, a.low, 16, &z.high, &z.low ); - return z; - -} - -/* -------------------------------------------------------------------------------- -Returns the result of converting the canonical NaN `a' to the quadruple- -precision floating-point format. -------------------------------------------------------------------------------- -*/ -static float128 commonNaNToFloat128( commonNaNT a ) -{ - float128 z; - - shift128Right( a.high, a.low, 16, &z.high, &z.low ); - z.high |= ( ( (bits64) a.sign )<<63 ) | LIT64( 0x7FFF800000000000 ); - return z; - -} - -/* -------------------------------------------------------------------------------- -Takes two quadruple-precision floating-point values `a' and `b', one of -which is a NaN, and returns the appropriate NaN result. If either `a' or -`b' is a signaling NaN, the invalid exception is raised. -------------------------------------------------------------------------------- -*/ -static float128 propagateFloat128NaN( float128 a, float128 b ) -{ - flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN; - - aIsNaN = float128_is_nan( a ); - aIsSignalingNaN = float128_is_signaling_nan( a ); - bIsNaN = float128_is_nan( b ); - bIsSignalingNaN = float128_is_signaling_nan( b ); - a.high |= LIT64( 0x0000800000000000 ); - b.high |= LIT64( 0x0000800000000000 ); - if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise( float_flag_invalid ); - if ( aIsNaN ) { - return ( aIsSignalingNaN & bIsNaN ) ? b : a; - } - else { - return b; - } - -} - -#endif - diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/softfloat.txt b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/softfloat.txt deleted file mode 100644 index 65177b795771..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/softfloat.txt +++ /dev/null @@ -1,372 +0,0 @@ -NetBSD: softfloat.txt,v 1.2 2006/11/24 19:46:58 christos Exp - -SoftFloat Release 2a General Documentation - -John R. Hauser -1998 December 13 - - -------------------------------------------------------------------------------- -Introduction - -SoftFloat is a software implementation of floating-point that conforms to -the IEC/IEEE Standard for Binary Floating-Point Arithmetic. As many as four -formats are supported: single precision, double precision, extended double -precision, and quadruple precision. All operations required by the standard -are implemented, except for conversions to and from decimal. - -This document gives information about the types defined and the routines -implemented by SoftFloat. It does not attempt to define or explain the -IEC/IEEE Floating-Point Standard. Details about the standard are available -elsewhere. - - -------------------------------------------------------------------------------- -Limitations - -SoftFloat is written in C and is designed to work with other C code. The -SoftFloat header files assume an ISO/ANSI-style C compiler. No attempt -has been made to accommodate compilers that are not ISO-conformant. In -particular, the distributed header files will not be acceptable to any -compiler that does not recognize function prototypes. - -Support for the extended double-precision and quadruple-precision formats -depends on a C compiler that implements 64-bit integer arithmetic. If the -largest integer format supported by the C compiler is 32 bits, SoftFloat is -limited to only single and double precisions. When that is the case, all -references in this document to the extended double precision, quadruple -precision, and 64-bit integers should be ignored. - - -------------------------------------------------------------------------------- -Contents - - Introduction - Limitations - Contents - Legal Notice - Types and Functions - Rounding Modes - Extended Double-Precision Rounding Precision - Exceptions and Exception Flags - Function Details - Conversion Functions - Standard Arithmetic Functions - Remainder Functions - Round-to-Integer Functions - Comparison Functions - Signaling NaN Test Functions - Raise-Exception Function - Contact Information - - - -------------------------------------------------------------------------------- -Legal Notice - -SoftFloat was written by John R. Hauser. This work was made possible in -part by the International Computer Science Institute, located at Suite 600, -1947 Center Street, Berkeley, California 94704. Funding was partially -provided by the National Science Foundation under grant MIP-9311980. The -original version of this code was written as part of a project to build -a fixed-point vector processor in collaboration with the University of -California at Berkeley, overseen by Profs. Nelson Morgan and John Wawrzynek. - -THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. - - -------------------------------------------------------------------------------- -Types and Functions - -When 64-bit integers are supported by the compiler, the `softfloat.h' header -file defines four types: `float32' (single precision), `float64' (double -precision), `floatx80' (extended double precision), and `float128' -(quadruple precision). The `float32' and `float64' types are defined in -terms of 32-bit and 64-bit integer types, respectively, while the `float128' -type is defined as a structure of two 64-bit integers, taking into account -the byte order of the particular machine being used. The `floatx80' type -is defined as a structure containing one 16-bit and one 64-bit integer, with -the machine's byte order again determining the order of the `high' and `low' -fields. - -When 64-bit integers are _not_ supported by the compiler, the `softfloat.h' -header file defines only two types: `float32' and `float64'. Because -ISO/ANSI C guarantees at least one built-in integer type of 32 bits, -the `float32' type is identified with an appropriate integer type. The -`float64' type is defined as a structure of two 32-bit integers, with the -machine's byte order determining the order of the fields. - -In either case, the types in `softfloat.h' are defined such that if a system -implements the usual C `float' and `double' types according to the IEC/IEEE -Standard, then the `float32' and `float64' types should be indistinguishable -in memory from the native `float' and `double' types. (On the other hand, -when `float32' or `float64' values are placed in processor registers by -the compiler, the type of registers used may differ from those used for the -native `float' and `double' types.) - -SoftFloat implements the following arithmetic operations: - --- Conversions among all the floating-point formats, and also between - integers (32-bit and 64-bit) and any of the floating-point formats. - --- The usual add, subtract, multiply, divide, and square root operations - for all floating-point formats. - --- For each format, the floating-point remainder operation defined by the - IEC/IEEE Standard. - --- For each floating-point format, a ``round to integer'' operation that - rounds to the nearest integer value in the same format. (The floating- - point formats can hold integer values, of course.) - --- Comparisons between two values in the same floating-point format. - -The only functions required by the IEC/IEEE Standard that are not provided -are conversions to and from decimal. - - -------------------------------------------------------------------------------- -Rounding Modes - -All four rounding modes prescribed by the IEC/IEEE Standard are implemented -for all operations that require rounding. The rounding mode is selected -by the global variable `float_rounding_mode'. This variable may be set -to one of the values `float_round_nearest_even', `float_round_to_zero', -`float_round_down', or `float_round_up'. The rounding mode is initialized -to nearest/even. - - -------------------------------------------------------------------------------- -Extended Double-Precision Rounding Precision - -For extended double precision (`floatx80') only, the rounding precision -of the standard arithmetic operations is controlled by the global variable -`floatx80_rounding_precision'. The operations affected are: - - floatx80_add floatx80_sub floatx80_mul floatx80_div floatx80_sqrt - -When `floatx80_rounding_precision' is set to its default value of 80, these -operations are rounded (as usual) to the full precision of the extended -double-precision format. Setting `floatx80_rounding_precision' to 32 -or to 64 causes the operations listed to be rounded to reduced precision -equivalent to single precision (`float32') or to double precision -(`float64'), respectively. When rounding to reduced precision, additional -bits in the result significand beyond the rounding point are set to zero. -The consequences of setting `floatx80_rounding_precision' to a value other -than 32, 64, or 80 is not specified. Operations other than the ones listed -above are not affected by `floatx80_rounding_precision'. - - -------------------------------------------------------------------------------- -Exceptions and Exception Flags - -All five exception flags required by the IEC/IEEE Standard are -implemented. Each flag is stored as a unique bit in the global variable -`float_exception_flags'. The positions of the exception flag bits within -this variable are determined by the bit masks `float_flag_inexact', -`float_flag_underflow', `float_flag_overflow', `float_flag_divbyzero', and -`float_flag_invalid'. The exception flags variable is initialized to all 0, -meaning no exceptions. - -An individual exception flag can be cleared with the statement - - float_exception_flags &= ~ float_flag_; - -where `' is the appropriate name. To raise a floating-point -exception, the SoftFloat function `float_raise' should be used (see below). - -In the terminology of the IEC/IEEE Standard, SoftFloat can detect tininess -for underflow either before or after rounding. The choice is made by -the global variable `float_detect_tininess', which can be set to either -`float_tininess_before_rounding' or `float_tininess_after_rounding'. -Detecting tininess after rounding is better because it results in fewer -spurious underflow signals. The other option is provided for compatibility -with some systems. Like most systems, SoftFloat always detects loss of -accuracy for underflow as an inexact result. - - -------------------------------------------------------------------------------- -Function Details - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Conversion Functions - -All conversions among the floating-point formats are supported, as are all -conversions between a floating-point format and 32-bit and 64-bit signed -integers. The complete set of conversion functions is: - - int32_to_float32 int64_to_float32 - int32_to_float64 int64_to_float32 - int32_to_floatx80 int64_to_floatx80 - int32_to_float128 int64_to_float128 - - float32_to_int32 float32_to_int64 - float32_to_int32 float64_to_int64 - floatx80_to_int32 floatx80_to_int64 - float128_to_int32 float128_to_int64 - - float32_to_float64 float32_to_floatx80 float32_to_float128 - float64_to_float32 float64_to_floatx80 float64_to_float128 - floatx80_to_float32 floatx80_to_float64 floatx80_to_float128 - float128_to_float32 float128_to_float64 float128_to_floatx80 - -Each conversion function takes one operand of the appropriate type and -returns one result. Conversions from a smaller to a larger floating-point -format are always exact and so require no rounding. Conversions from 32-bit -integers to double precision and larger formats are also exact, and likewise -for conversions from 64-bit integers to extended double and quadruple -precisions. - -Conversions from floating-point to integer raise the invalid exception if -the source value cannot be rounded to a representable integer of the desired -size (32 or 64 bits). If the floating-point operand is a NaN, the largest -positive integer is returned. Otherwise, if the conversion overflows, the -largest integer with the same sign as the operand is returned. - -On conversions to integer, if the floating-point operand is not already an -integer value, the operand is rounded according to the current rounding -mode as specified by `float_rounding_mode'. Because C (and perhaps other -languages) require that conversions to integers be rounded toward zero, the -following functions are provided for improved speed and convenience: - - float32_to_int32_round_to_zero float32_to_int64_round_to_zero - float64_to_int32_round_to_zero float64_to_int64_round_to_zero - floatx80_to_int32_round_to_zero floatx80_to_int64_round_to_zero - float128_to_int32_round_to_zero float128_to_int64_round_to_zero - -These variant functions ignore `float_rounding_mode' and always round toward -zero. - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Standard Arithmetic Functions - -The following standard arithmetic functions are provided: - - float32_add float32_sub float32_mul float32_div float32_sqrt - float64_add float64_sub float64_mul float64_div float64_sqrt - floatx80_add floatx80_sub floatx80_mul floatx80_div floatx80_sqrt - float128_add float128_sub float128_mul float128_div float128_sqrt - -Each function takes two operands, except for `sqrt' which takes only one. -The operands and result are all of the same type. - -Rounding of the extended double-precision (`floatx80') functions is affected -by the `floatx80_rounding_precision' variable, as explained above in the -section _Extended_Double-Precision_Rounding_Precision_. - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Remainder Functions - -For each format, SoftFloat implements the remainder function according to -the IEC/IEEE Standard. The remainder functions are: - - float32_rem - float64_rem - floatx80_rem - float128_rem - -Each remainder function takes two operands. The operands and result are all -of the same type. Given operands x and y, the remainder functions return -the value x - n*y, where n is the integer closest to x/y. If x/y is exactly -halfway between two integers, n is the even integer closest to x/y. The -remainder functions are always exact and so require no rounding. - -Depending on the relative magnitudes of the operands, the remainder -functions can take considerably longer to execute than the other SoftFloat -functions. This is inherent in the remainder operation itself and is not a -flaw in the SoftFloat implementation. - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Round-to-Integer Functions - -For each format, SoftFloat implements the round-to-integer function -specified by the IEC/IEEE Standard. The functions are: - - float32_round_to_int - float64_round_to_int - floatx80_round_to_int - float128_round_to_int - -Each function takes a single floating-point operand and returns a result of -the same type. (Note that the result is not an integer type.) The operand -is rounded to an exact integer according to the current rounding mode, and -the resulting integer value is returned in the same floating-point format. - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Comparison Functions - -The following floating-point comparison functions are provided: - - float32_eq float32_le float32_lt - float64_eq float64_le float64_lt - floatx80_eq floatx80_le floatx80_lt - float128_eq float128_le float128_lt - -Each function takes two operands of the same type and returns a 1 or 0 -representing either _true_ or _false_. The abbreviation `eq' stands for -``equal'' (=); `le' stands for ``less than or equal'' (<=); and `lt' stands -for ``less than'' (<). - -The standard greater-than (>), greater-than-or-equal (>=), and not-equal -(!=) functions are easily obtained using the functions provided. The -not-equal function is just the logical complement of the equal function. -The greater-than-or-equal function is identical to the less-than-or-equal -function with the operands reversed; and the greater-than function can be -obtained from the less-than function in the same way. - -The IEC/IEEE Standard specifies that the less-than-or-equal and less-than -functions raise the invalid exception if either input is any kind of NaN. -The equal functions, on the other hand, are defined not to raise the invalid -exception on quiet NaNs. For completeness, SoftFloat provides the following -additional functions: - - float32_eq_signaling float32_le_quiet float32_lt_quiet - float64_eq_signaling float64_le_quiet float64_lt_quiet - floatx80_eq_signaling floatx80_le_quiet floatx80_lt_quiet - float128_eq_signaling float128_le_quiet float128_lt_quiet - -The `signaling' equal functions are identical to the standard functions -except that the invalid exception is raised for any NaN input. Likewise, -the `quiet' comparison functions are identical to their counterparts except -that the invalid exception is not raised for quiet NaNs. - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Signaling NaN Test Functions - -The following functions test whether a floating-point value is a signaling -NaN: - - float32_is_signaling_nan - float64_is_signaling_nan - floatx80_is_signaling_nan - float128_is_signaling_nan - -The functions take one operand and return 1 if the operand is a signaling -NaN and 0 otherwise. - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Raise-Exception Function - -SoftFloat provides a function for raising floating-point exceptions: - - float_raise - -The function takes a mask indicating the set of exceptions to raise. No -result is returned. In addition to setting the specified exception flags, -this function may cause a trap or abort appropriate for the current system. - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -------------------------------------------------------------------------------- -Contact Information - -At the time of this writing, the most up-to-date information about -SoftFloat and the latest release can be found at the Web page `http:// -HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/SoftFloat.html'. - - diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/templates/milieu.h b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/templates/milieu.h deleted file mode 100644 index 2fcfa1fa1257..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/templates/milieu.h +++ /dev/null @@ -1,48 +0,0 @@ - -/* -=============================================================================== - -This C header file is part of the SoftFloat IEC/IEEE Floating-point -Arithmetic Package, Release 2a. - -Written by John R. Hauser. This work was made possible in part by the -International Computer Science Institute, located at Suite 600, 1947 Center -Street, Berkeley, California 94704. Funding was partially provided by the -National Science Foundation under grant MIP-9311980. The original version -of this code was written as part of a project to build a fixed-point vector -processor in collaboration with the University of California at Berkeley, -overseen by Profs. Nelson Morgan and John Wawrzynek. More information -is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ -arithmetic/SoftFloat.html'. - -THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. - -Derivative works are acceptable, even for commercial purposes, so long as -(1) they include prominent notice that the work is derivative, and (2) they -include prominent notice akin to these four paragraphs for those parts of -this code that are retained. - -=============================================================================== -*/ - -/* -------------------------------------------------------------------------------- -Include common integer types and flags. -------------------------------------------------------------------------------- -*/ -#include "../../../processors/!!!processor.h" - -/* -------------------------------------------------------------------------------- -Symbolic Boolean literals. -------------------------------------------------------------------------------- -*/ -enum { - FALSE = 0, - TRUE = 1 -}; - diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/templates/softfloat-specialize b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/templates/softfloat-specialize deleted file mode 100644 index d8b2500f4a51..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/templates/softfloat-specialize +++ /dev/null @@ -1,464 +0,0 @@ - -/* -=============================================================================== - -This C source fragment is part of the SoftFloat IEC/IEEE Floating-point -Arithmetic Package, Release 2a. - -Written by John R. Hauser. This work was made possible in part by the -International Computer Science Institute, located at Suite 600, 1947 Center -Street, Berkeley, California 94704. Funding was partially provided by the -National Science Foundation under grant MIP-9311980. The original version -of this code was written as part of a project to build a fixed-point vector -processor in collaboration with the University of California at Berkeley, -overseen by Profs. Nelson Morgan and John Wawrzynek. More information -is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ -arithmetic/SoftFloat.html'. - -THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. - -Derivative works are acceptable, even for commercial purposes, so long as -(1) they include prominent notice that the work is derivative, and (2) they -include prominent notice akin to these four paragraphs for those parts of -this code that are retained. - -=============================================================================== -*/ - -/* -------------------------------------------------------------------------------- -Underflow tininess-detection mode, statically initialized to default value. -(The declaration in `softfloat.h' must match the `int8' type here.) -------------------------------------------------------------------------------- -*/ -int8 float_detect_tininess = float_tininess_after_rounding; - -/* -------------------------------------------------------------------------------- -Raises the exceptions specified by `flags'. Floating-point traps can be -defined here if desired. It is currently not possible for such a trap to -substitute a result value. If traps are not implemented, this routine -should be simply `float_exception_flags |= flags;'. -------------------------------------------------------------------------------- -*/ -void float_raise( int8 flags ) -{ - - float_exception_flags |= flags; - -} - -/* -------------------------------------------------------------------------------- -Internal canonical NaN format. -------------------------------------------------------------------------------- -*/ -typedef struct { - flag sign; - bits64 high, low; -} commonNaNT; - -/* -------------------------------------------------------------------------------- -The pattern for a default generated single-precision NaN. -------------------------------------------------------------------------------- -*/ -#define float32_default_nan 0xFFFFFFFF - -/* -------------------------------------------------------------------------------- -Returns 1 if the single-precision floating-point value `a' is a NaN; -otherwise returns 0. -------------------------------------------------------------------------------- -*/ -flag float32_is_nan( float32 a ) -{ - - return ( 0xFF000000 < (bits32) ( a<<1 ) ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the single-precision floating-point value `a' is a signaling -NaN; otherwise returns 0. -------------------------------------------------------------------------------- -*/ -flag float32_is_signaling_nan( float32 a ) -{ - - return ( ( ( a>>22 ) & 0x1FF ) == 0x1FE ) && ( a & 0x003FFFFF ); - -} - -/* -------------------------------------------------------------------------------- -Returns the result of converting the single-precision floating-point NaN -`a' to the canonical NaN format. If `a' is a signaling NaN, the invalid -exception is raised. -------------------------------------------------------------------------------- -*/ -static commonNaNT float32ToCommonNaN( float32 a ) -{ - commonNaNT z; - - if ( float32_is_signaling_nan( a ) ) float_raise( float_flag_invalid ); - z.sign = a>>31; - z.low = 0; - z.high = ( (bits64) a )<<41; - return z; - -} - -/* -------------------------------------------------------------------------------- -Returns the result of converting the canonical NaN `a' to the single- -precision floating-point format. -------------------------------------------------------------------------------- -*/ -static float32 commonNaNToFloat32( commonNaNT a ) -{ - - return ( ( (bits32) a.sign )<<31 ) | 0x7FC00000 | ( a.high>>41 ); - -} - -/* -------------------------------------------------------------------------------- -Takes two single-precision floating-point values `a' and `b', one of which -is a NaN, and returns the appropriate NaN result. If either `a' or `b' is a -signaling NaN, the invalid exception is raised. -------------------------------------------------------------------------------- -*/ -static float32 propagateFloat32NaN( float32 a, float32 b ) -{ - flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN; - - aIsNaN = float32_is_nan( a ); - aIsSignalingNaN = float32_is_signaling_nan( a ); - bIsNaN = float32_is_nan( b ); - bIsSignalingNaN = float32_is_signaling_nan( b ); - a |= 0x00400000; - b |= 0x00400000; - if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise( float_flag_invalid ); - if ( aIsNaN ) { - return ( aIsSignalingNaN & bIsNaN ) ? b : a; - } - else { - return b; - } - -} - -/* -------------------------------------------------------------------------------- -The pattern for a default generated double-precision NaN. -------------------------------------------------------------------------------- -*/ -#define float64_default_nan LIT64( 0xFFFFFFFFFFFFFFFF ) - -/* -------------------------------------------------------------------------------- -Returns 1 if the double-precision floating-point value `a' is a NaN; -otherwise returns 0. -------------------------------------------------------------------------------- -*/ -flag float64_is_nan( float64 a ) -{ - - return ( LIT64( 0xFFE0000000000000 ) < (bits64) ( a<<1 ) ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the double-precision floating-point value `a' is a signaling -NaN; otherwise returns 0. -------------------------------------------------------------------------------- -*/ -flag float64_is_signaling_nan( float64 a ) -{ - - return - ( ( ( a>>51 ) & 0xFFF ) == 0xFFE ) - && ( a & LIT64( 0x0007FFFFFFFFFFFF ) ); - -} - -/* -------------------------------------------------------------------------------- -Returns the result of converting the double-precision floating-point NaN -`a' to the canonical NaN format. If `a' is a signaling NaN, the invalid -exception is raised. -------------------------------------------------------------------------------- -*/ -static commonNaNT float64ToCommonNaN( float64 a ) -{ - commonNaNT z; - - if ( float64_is_signaling_nan( a ) ) float_raise( float_flag_invalid ); - z.sign = a>>63; - z.low = 0; - z.high = a<<12; - return z; - -} - -/* -------------------------------------------------------------------------------- -Returns the result of converting the canonical NaN `a' to the double- -precision floating-point format. -------------------------------------------------------------------------------- -*/ -static float64 commonNaNToFloat64( commonNaNT a ) -{ - - return - ( ( (bits64) a.sign )<<63 ) - | LIT64( 0x7FF8000000000000 ) - | ( a.high>>12 ); - -} - -/* -------------------------------------------------------------------------------- -Takes two double-precision floating-point values `a' and `b', one of which -is a NaN, and returns the appropriate NaN result. If either `a' or `b' is a -signaling NaN, the invalid exception is raised. -------------------------------------------------------------------------------- -*/ -static float64 propagateFloat64NaN( float64 a, float64 b ) -{ - flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN; - - aIsNaN = float64_is_nan( a ); - aIsSignalingNaN = float64_is_signaling_nan( a ); - bIsNaN = float64_is_nan( b ); - bIsSignalingNaN = float64_is_signaling_nan( b ); - a |= LIT64( 0x0008000000000000 ); - b |= LIT64( 0x0008000000000000 ); - if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise( float_flag_invalid ); - if ( aIsNaN ) { - return ( aIsSignalingNaN & bIsNaN ) ? b : a; - } - else { - return b; - } - -} - -#ifdef FLOATX80 - -/* -------------------------------------------------------------------------------- -The pattern for a default generated extended double-precision NaN. The -`high' and `low' values hold the most- and least-significant bits, -respectively. -------------------------------------------------------------------------------- -*/ -#define floatx80_default_nan_high 0xFFFF -#define floatx80_default_nan_low LIT64( 0xFFFFFFFFFFFFFFFF ) - -/* -------------------------------------------------------------------------------- -Returns 1 if the extended double-precision floating-point value `a' is a -NaN; otherwise returns 0. -------------------------------------------------------------------------------- -*/ -flag floatx80_is_nan( floatx80 a ) -{ - - return ( ( a.high & 0x7FFF ) == 0x7FFF ) && (bits64) ( a.low<<1 ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the extended double-precision floating-point value `a' is a -signaling NaN; otherwise returns 0. -------------------------------------------------------------------------------- -*/ -flag floatx80_is_signaling_nan( floatx80 a ) -{ - bits64 aLow; - - aLow = a.low & ~ LIT64( 0x4000000000000000 ); - return - ( ( a.high & 0x7FFF ) == 0x7FFF ) - && (bits64) ( aLow<<1 ) - && ( a.low == aLow ); - -} - -/* -------------------------------------------------------------------------------- -Returns the result of converting the extended double-precision floating- -point NaN `a' to the canonical NaN format. If `a' is a signaling NaN, the -invalid exception is raised. -------------------------------------------------------------------------------- -*/ -static commonNaNT floatx80ToCommonNaN( floatx80 a ) -{ - commonNaNT z; - - if ( floatx80_is_signaling_nan( a ) ) float_raise( float_flag_invalid ); - z.sign = a.high>>15; - z.low = 0; - z.high = a.low<<1; - return z; - -} - -/* -------------------------------------------------------------------------------- -Returns the result of converting the canonical NaN `a' to the extended -double-precision floating-point format. -------------------------------------------------------------------------------- -*/ -static floatx80 commonNaNToFloatx80( commonNaNT a ) -{ - floatx80 z; - - z.low = LIT64( 0xC000000000000000 ) | ( a.high>>1 ); - z.high = ( ( (bits16) a.sign )<<15 ) | 0x7FFF; - return z; - -} - -/* -------------------------------------------------------------------------------- -Takes two extended double-precision floating-point values `a' and `b', one -of which is a NaN, and returns the appropriate NaN result. If either `a' or -`b' is a signaling NaN, the invalid exception is raised. -------------------------------------------------------------------------------- -*/ -static floatx80 propagateFloatx80NaN( floatx80 a, floatx80 b ) -{ - flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN; - - aIsNaN = floatx80_is_nan( a ); - aIsSignalingNaN = floatx80_is_signaling_nan( a ); - bIsNaN = floatx80_is_nan( b ); - bIsSignalingNaN = floatx80_is_signaling_nan( b ); - a.low |= LIT64( 0xC000000000000000 ); - b.low |= LIT64( 0xC000000000000000 ); - if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise( float_flag_invalid ); - if ( aIsNaN ) { - return ( aIsSignalingNaN & bIsNaN ) ? b : a; - } - else { - return b; - } - -} - -#endif - -#ifdef FLOAT128 - -/* -------------------------------------------------------------------------------- -The pattern for a default generated quadruple-precision NaN. The `high' and -`low' values hold the most- and least-significant bits, respectively. -------------------------------------------------------------------------------- -*/ -#define float128_default_nan_high LIT64( 0xFFFFFFFFFFFFFFFF ) -#define float128_default_nan_low LIT64( 0xFFFFFFFFFFFFFFFF ) - -/* -------------------------------------------------------------------------------- -Returns 1 if the quadruple-precision floating-point value `a' is a NaN; -otherwise returns 0. -------------------------------------------------------------------------------- -*/ -flag float128_is_nan( float128 a ) -{ - - return - ( LIT64( 0xFFFE000000000000 ) <= (bits64) ( a.high<<1 ) ) - && ( a.low || ( a.high & LIT64( 0x0000FFFFFFFFFFFF ) ) ); - -} - -/* -------------------------------------------------------------------------------- -Returns 1 if the quadruple-precision floating-point value `a' is a -signaling NaN; otherwise returns 0. -------------------------------------------------------------------------------- -*/ -flag float128_is_signaling_nan( float128 a ) -{ - - return - ( ( ( a.high>>47 ) & 0xFFFF ) == 0xFFFE ) - && ( a.low || ( a.high & LIT64( 0x00007FFFFFFFFFFF ) ) ); - -} - -/* -------------------------------------------------------------------------------- -Returns the result of converting the quadruple-precision floating-point NaN -`a' to the canonical NaN format. If `a' is a signaling NaN, the invalid -exception is raised. -------------------------------------------------------------------------------- -*/ -static commonNaNT float128ToCommonNaN( float128 a ) -{ - commonNaNT z; - - if ( float128_is_signaling_nan( a ) ) float_raise( float_flag_invalid ); - z.sign = a.high>>63; - shortShift128Left( a.high, a.low, 16, &z.high, &z.low ); - return z; - -} - -/* -------------------------------------------------------------------------------- -Returns the result of converting the canonical NaN `a' to the quadruple- -precision floating-point format. -------------------------------------------------------------------------------- -*/ -static float128 commonNaNToFloat128( commonNaNT a ) -{ - float128 z; - - shift128Right( a.high, a.low, 16, &z.high, &z.low ); - z.high |= ( ( (bits64) a.sign )<<63 ) | LIT64( 0x7FFF800000000000 ); - return z; - -} - -/* -------------------------------------------------------------------------------- -Takes two quadruple-precision floating-point values `a' and `b', one of -which is a NaN, and returns the appropriate NaN result. If either `a' or -`b' is a signaling NaN, the invalid exception is raised. -------------------------------------------------------------------------------- -*/ -static float128 propagateFloat128NaN( float128 a, float128 b ) -{ - flag aIsNaN, aIsSignalingNaN, bIsNaN, bIsSignalingNaN; - - aIsNaN = float128_is_nan( a ); - aIsSignalingNaN = float128_is_signaling_nan( a ); - bIsNaN = float128_is_nan( b ); - bIsSignalingNaN = float128_is_signaling_nan( b ); - a.high |= LIT64( 0x0000800000000000 ); - b.high |= LIT64( 0x0000800000000000 ); - if ( aIsSignalingNaN | bIsSignalingNaN ) float_raise( float_flag_invalid ); - if ( aIsNaN ) { - return ( aIsSignalingNaN & bIsNaN ) ? b : a; - } - else { - return b; - } - -} - -#endif - diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/templates/softfloat.h b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/templates/softfloat.h deleted file mode 100644 index 8c0fe101342b..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/templates/softfloat.h +++ /dev/null @@ -1,290 +0,0 @@ - -/* -=============================================================================== - -This C header file is part of the SoftFloat IEC/IEEE Floating-point -Arithmetic Package, Release 2a. - -Written by John R. Hauser. This work was made possible in part by the -International Computer Science Institute, located at Suite 600, 1947 Center -Street, Berkeley, California 94704. Funding was partially provided by the -National Science Foundation under grant MIP-9311980. The original version -of this code was written as part of a project to build a fixed-point vector -processor in collaboration with the University of California at Berkeley, -overseen by Profs. Nelson Morgan and John Wawrzynek. More information -is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ -arithmetic/SoftFloat.html'. - -THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. - -Derivative works are acceptable, even for commercial purposes, so long as -(1) they include prominent notice that the work is derivative, and (2) they -include prominent notice akin to these four paragraphs for those parts of -this code that are retained. - -=============================================================================== -*/ - -/* -------------------------------------------------------------------------------- -The macro `FLOATX80' must be defined to enable the extended double-precision -floating-point format `floatx80'. If this macro is not defined, the -`floatx80' type will not be defined, and none of the functions that either -input or output the `floatx80' type will be defined. The same applies to -the `FLOAT128' macro and the quadruple-precision format `float128'. -------------------------------------------------------------------------------- -*/ -#define FLOATX80 -#define FLOAT128 - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE floating-point types. -------------------------------------------------------------------------------- -*/ -typedef !!!bits32 float32; -typedef !!!bits64 float64; -#ifdef FLOATX80 -typedef struct { - !!!bits16 high; - !!!bits64 low; -} floatx80; -#endif -#ifdef FLOAT128 -typedef struct { - !!!bits64 high, low; -} float128; -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE floating-point underflow tininess-detection mode. -------------------------------------------------------------------------------- -*/ -extern !!!int8 float_detect_tininess; -enum { - float_tininess_after_rounding = 0, - float_tininess_before_rounding = 1 -}; - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE floating-point rounding mode. -------------------------------------------------------------------------------- -*/ -extern !!!int8 float_rounding_mode; -enum { - float_round_nearest_even = 0, - float_round_to_zero = 1, - float_round_down = 2, - float_round_up = 3 -}; - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE floating-point exception flags. -------------------------------------------------------------------------------- -*/ -extern !!!int8 float_exception_flags; -enum { - float_flag_inexact = 1, - float_flag_underflow = 2, - float_flag_overflow = 4, - float_flag_divbyzero = 8, - float_flag_invalid = 16 -}; - -/* -------------------------------------------------------------------------------- -Routine to raise any or all of the software IEC/IEEE floating-point -exception flags. -------------------------------------------------------------------------------- -*/ -void float_raise( !!!int8 ); - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE integer-to-floating-point conversion routines. -------------------------------------------------------------------------------- -*/ -float32 int32_to_float32( !!!int32 ); -float64 int32_to_float64( !!!int32 ); -#ifdef FLOATX80 -floatx80 int32_to_floatx80( !!!int32 ); -#endif -#ifdef FLOAT128 -float128 int32_to_float128( !!!int32 ); -#endif -float32 int64_to_float32( !!!int64 ); -float64 int64_to_float64( !!!int64 ); -#ifdef FLOATX80 -floatx80 int64_to_floatx80( !!!int64 ); -#endif -#ifdef FLOAT128 -float128 int64_to_float128( !!!int64 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE single-precision conversion routines. -------------------------------------------------------------------------------- -*/ -!!!int32 float32_to_int32( float32 ); -!!!int32 float32_to_int32_round_to_zero( float32 ); -!!!int64 float32_to_int64( float32 ); -!!!int64 float32_to_int64_round_to_zero( float32 ); -float64 float32_to_float64( float32 ); -#ifdef FLOATX80 -floatx80 float32_to_floatx80( float32 ); -#endif -#ifdef FLOAT128 -float128 float32_to_float128( float32 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE single-precision operations. -------------------------------------------------------------------------------- -*/ -float32 float32_round_to_int( float32 ); -float32 float32_add( float32, float32 ); -float32 float32_sub( float32, float32 ); -float32 float32_mul( float32, float32 ); -float32 float32_div( float32, float32 ); -float32 float32_rem( float32, float32 ); -float32 float32_sqrt( float32 ); -!!!flag float32_eq( float32, float32 ); -!!!flag float32_le( float32, float32 ); -!!!flag float32_lt( float32, float32 ); -!!!flag float32_eq_signaling( float32, float32 ); -!!!flag float32_le_quiet( float32, float32 ); -!!!flag float32_lt_quiet( float32, float32 ); -!!!flag float32_is_signaling_nan( float32 ); - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE double-precision conversion routines. -------------------------------------------------------------------------------- -*/ -!!!int32 float64_to_int32( float64 ); -!!!int32 float64_to_int32_round_to_zero( float64 ); -!!!int64 float64_to_int64( float64 ); -!!!int64 float64_to_int64_round_to_zero( float64 ); -float32 float64_to_float32( float64 ); -#ifdef FLOATX80 -floatx80 float64_to_floatx80( float64 ); -#endif -#ifdef FLOAT128 -float128 float64_to_float128( float64 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE double-precision operations. -------------------------------------------------------------------------------- -*/ -float64 float64_round_to_int( float64 ); -float64 float64_add( float64, float64 ); -float64 float64_sub( float64, float64 ); -float64 float64_mul( float64, float64 ); -float64 float64_div( float64, float64 ); -float64 float64_rem( float64, float64 ); -float64 float64_sqrt( float64 ); -!!!flag float64_eq( float64, float64 ); -!!!flag float64_le( float64, float64 ); -!!!flag float64_lt( float64, float64 ); -!!!flag float64_eq_signaling( float64, float64 ); -!!!flag float64_le_quiet( float64, float64 ); -!!!flag float64_lt_quiet( float64, float64 ); -!!!flag float64_is_signaling_nan( float64 ); - -#ifdef FLOATX80 - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE extended double-precision conversion routines. -------------------------------------------------------------------------------- -*/ -!!!int32 floatx80_to_int32( floatx80 ); -!!!int32 floatx80_to_int32_round_to_zero( floatx80 ); -!!!int64 floatx80_to_int64( floatx80 ); -!!!int64 floatx80_to_int64_round_to_zero( floatx80 ); -float32 floatx80_to_float32( floatx80 ); -float64 floatx80_to_float64( floatx80 ); -#ifdef FLOAT128 -float128 floatx80_to_float128( floatx80 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE extended double-precision rounding precision. Valid -values are 32, 64, and 80. -------------------------------------------------------------------------------- -*/ -extern !!!int8 floatx80_rounding_precision; - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE extended double-precision operations. -------------------------------------------------------------------------------- -*/ -floatx80 floatx80_round_to_int( floatx80 ); -floatx80 floatx80_add( floatx80, floatx80 ); -floatx80 floatx80_sub( floatx80, floatx80 ); -floatx80 floatx80_mul( floatx80, floatx80 ); -floatx80 floatx80_div( floatx80, floatx80 ); -floatx80 floatx80_rem( floatx80, floatx80 ); -floatx80 floatx80_sqrt( floatx80 ); -!!!flag floatx80_eq( floatx80, floatx80 ); -!!!flag floatx80_le( floatx80, floatx80 ); -!!!flag floatx80_lt( floatx80, floatx80 ); -!!!flag floatx80_eq_signaling( floatx80, floatx80 ); -!!!flag floatx80_le_quiet( floatx80, floatx80 ); -!!!flag floatx80_lt_quiet( floatx80, floatx80 ); -!!!flag floatx80_is_signaling_nan( floatx80 ); - -#endif - -#ifdef FLOAT128 - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE quadruple-precision conversion routines. -------------------------------------------------------------------------------- -*/ -!!!int32 float128_to_int32( float128 ); -!!!int32 float128_to_int32_round_to_zero( float128 ); -!!!int64 float128_to_int64( float128 ); -!!!int64 float128_to_int64_round_to_zero( float128 ); -float32 float128_to_float32( float128 ); -float64 float128_to_float64( float128 ); -#ifdef FLOATX80 -floatx80 float128_to_floatx80( float128 ); -#endif - -/* -------------------------------------------------------------------------------- -Software IEC/IEEE quadruple-precision operations. -------------------------------------------------------------------------------- -*/ -float128 float128_round_to_int( float128 ); -float128 float128_add( float128, float128 ); -float128 float128_sub( float128, float128 ); -float128 float128_mul( float128, float128 ); -float128 float128_div( float128, float128 ); -float128 float128_rem( float128, float128 ); -float128 float128_sqrt( float128 ); -!!!flag float128_eq( float128, float128 ); -!!!flag float128_le( float128, float128 ); -!!!flag float128_lt( float128, float128 ); -!!!flag float128_eq_signaling( float128, float128 ); -!!!flag float128_le_quiet( float128, float128 ); -!!!flag float128_lt_quiet( float128, float128 ); -!!!flag float128_is_signaling_nan( float128 ); - -#endif - diff --git a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/timesoftfloat.c b/external/bsd/pcc/dist/pcc-libs/libsoftfloat/timesoftfloat.c deleted file mode 100644 index 3a1914ae8361..000000000000 --- a/external/bsd/pcc/dist/pcc-libs/libsoftfloat/timesoftfloat.c +++ /dev/null @@ -1,2636 +0,0 @@ -/* NetBSD: timesoftfloat.c,v 1.1 2000/06/06 08:15:11 bjh21 Exp */ - -/* -=============================================================================== - -This C source file is part of the SoftFloat IEC/IEEE Floating-point -Arithmetic Package, Release 2a. - -Written by John R. Hauser. This work was made possible in part by the -International Computer Science Institute, located at Suite 600, 1947 Center -Street, Berkeley, California 94704. Funding was partially provided by the -National Science Foundation under grant MIP-9311980. The original version -of this code was written as part of a project to build a fixed-point vector -processor in collaboration with the University of California at Berkeley, -overseen by Profs. Nelson Morgan and John Wawrzynek. More information -is available through the Web page `http://HTTP.CS.Berkeley.EDU/~jhauser/ -arithmetic/SoftFloat.html'. - -THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort -has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT -TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO -PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY -AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE. - -Derivative works are acceptable, even for commercial purposes, so long as -(1) they include prominent notice that the work is derivative, and (2) they -include prominent notice akin to these four paragraphs for those parts of -this code that are retained. - -=============================================================================== -*/ - -#include -#include -#include -#include -#include -#include "milieu.h" -#include "softfloat.h" - -enum { - minIterations = 1000 -}; - -static void fail( const char *message, ... ) -{ - va_list varArgs; - - fputs( "timesoftfloat: ", stderr ); - va_start( varArgs, message ); - vfprintf( stderr, message, varArgs ); - va_end( varArgs ); - fputs( ".\n", stderr ); - exit( EXIT_FAILURE ); - -} - -static char *functionName; -static char *roundingPrecisionName, *roundingModeName, *tininessModeName; - -static void reportTime( int32 count, long clocks ) -{ - - printf( - "%8.1f kops/s: %s", - ( count / ( ( (float) clocks ) / CLOCKS_PER_SEC ) ) / 1000, - functionName - ); - if ( roundingModeName ) { - if ( roundingPrecisionName ) { - fputs( ", precision ", stdout ); - fputs( roundingPrecisionName, stdout ); - } - fputs( ", rounding ", stdout ); - fputs( roundingModeName, stdout ); - if ( tininessModeName ) { - fputs( ", tininess ", stdout ); - fputs( tininessModeName, stdout ); - fputs( " rounding", stdout ); - } - } - fputc( '\n', stdout ); - -} - -enum { - numInputs_int32 = 32 -}; - -static const int32 inputs_int32[ numInputs_int32 ] = { - 0xFFFFBB79, 0x405CF80F, 0x00000000, 0xFFFFFD04, - 0xFFF20002, 0x0C8EF795, 0xF00011FF, 0x000006CA, - 0x00009BFE, 0xFF4862E3, 0x9FFFEFFE, 0xFFFFFFB7, - 0x0BFF7FFF, 0x0000F37A, 0x0011DFFE, 0x00000006, - 0xFFF02006, 0xFFFFF7D1, 0x10200003, 0xDE8DF765, - 0x00003E02, 0x000019E8, 0x0008FFFE, 0xFFFFFB5C, - 0xFFDF7FFE, 0x07C42FBF, 0x0FFFE3FF, 0x040B9F13, - 0xBFFFFFF8, 0x0001BF56, 0x000017F6, 0x000A908A -}; - -static void time_a_int32_z_float32( float32 function( int32 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - function( inputs_int32[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_int32 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - function( inputs_int32[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_int32 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -static void time_a_int32_z_float64( float64 function( int32 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - function( inputs_int32[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_int32 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - function( inputs_int32[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_int32 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -#ifdef FLOATX80 - -static void time_a_int32_z_floatx80( floatx80 function( int32 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - function( inputs_int32[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_int32 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - function( inputs_int32[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_int32 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -#endif - -#ifdef FLOAT128 - -static void time_a_int32_z_float128( float128 function( int32 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - function( inputs_int32[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_int32 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - function( inputs_int32[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_int32 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -#endif - -enum { - numInputs_int64 = 32 -}; - -static const int64 inputs_int64[ numInputs_int64 ] = { - LIT64( 0xFBFFC3FFFFFFFFFF ), - LIT64( 0x0000000003C589BC ), - LIT64( 0x00000000400013FE ), - LIT64( 0x0000000000186171 ), - LIT64( 0xFFFFFFFFFFFEFBFA ), - LIT64( 0xFFFFFD79E6DFFC73 ), - LIT64( 0x0000000010001DFF ), - LIT64( 0xDD1A0F0C78513710 ), - LIT64( 0xFFFF83FFFFFEFFFE ), - LIT64( 0x00756EBD1AD0C1C7 ), - LIT64( 0x0003FDFFFFFFFFBE ), - LIT64( 0x0007D0FB2C2CA951 ), - LIT64( 0x0007FC0007FFFFFE ), - LIT64( 0x0000001F942B18BB ), - LIT64( 0x0000080101FFFFFE ), - LIT64( 0xFFFFFFFFFFFF0978 ), - LIT64( 0x000000000008BFFF ), - LIT64( 0x0000000006F5AF08 ), - LIT64( 0xFFDEFF7FFFFFFFFE ), - LIT64( 0x0000000000000003 ), - LIT64( 0x3FFFFFFFFF80007D ), - LIT64( 0x0000000000000078 ), - LIT64( 0xFFF80000007FDFFD ), - LIT64( 0x1BBC775B78016AB0 ), - LIT64( 0xFFF9001FFFFFFFFE ), - LIT64( 0xFFFD4767AB98E43F ), - LIT64( 0xFFFFFEFFFE00001E ), - LIT64( 0xFFFFFFFFFFF04EFD ), - LIT64( 0x07FFFFFFFFFFF7FF ), - LIT64( 0xFFFC9EAA38F89050 ), - LIT64( 0x00000020FBFFFFFE ), - LIT64( 0x0000099AE6455357 ) -}; - -static void time_a_int64_z_float32( float32 function( int64 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - function( inputs_int64[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_int64 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - function( inputs_int64[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_int64 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -static void time_a_int64_z_float64( float64 function( int64 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - function( inputs_int64[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_int64 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - function( inputs_int64[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_int64 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -#ifdef FLOATX80 - -static void time_a_int64_z_floatx80( floatx80 function( int64 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - function( inputs_int64[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_int64 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - function( inputs_int64[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_int64 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -#endif - -#ifdef FLOAT128 - -static void time_a_int64_z_float128( float128 function( int64 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - function( inputs_int64[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_int64 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - function( inputs_int64[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_int64 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -#endif - -enum { - numInputs_float32 = 32 -}; - -static const float32 inputs_float32[ numInputs_float32 ] = { - 0x4EFA0000, 0xC1D0B328, 0x80000000, 0x3E69A31E, - 0xAF803EFF, 0x3F800000, 0x17BF8000, 0xE74A301A, - 0x4E010003, 0x7EE3C75D, 0xBD803FE0, 0xBFFEFF00, - 0x7981F800, 0x431FFFFC, 0xC100C000, 0x3D87EFFF, - 0x4103FEFE, 0xBC000007, 0xBF01F7FF, 0x4E6C6B5C, - 0xC187FFFE, 0xC58B9F13, 0x4F88007F, 0xDF004007, - 0xB7FFD7FE, 0x7E8001FB, 0x46EFFBFF, 0x31C10000, - 0xDB428661, 0x33F89B1F, 0xA3BFEFFF, 0x537BFFBE -}; - -static void time_a_float32_z_int32( int32 function( float32 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - function( inputs_float32[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - function( inputs_float32[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -static void time_a_float32_z_int64( int64 function( float32 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - function( inputs_float32[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - function( inputs_float32[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -static void time_a_float32_z_float64( float64 function( float32 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - function( inputs_float32[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - function( inputs_float32[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -#ifdef FLOATX80 - -static void time_a_float32_z_floatx80( floatx80 function( float32 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - function( inputs_float32[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - function( inputs_float32[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -#endif - -#ifdef FLOAT128 - -static void time_a_float32_z_float128( float128 function( float32 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - function( inputs_float32[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - function( inputs_float32[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -#endif - -static void time_az_float32( float32 function( float32 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - function( inputs_float32[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - function( inputs_float32[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -static void time_ab_float32_z_flag( flag function( float32, float32 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNumA, inputNumB; - - count = 0; - inputNumA = 0; - inputNumB = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - function( - inputs_float32[ inputNumA ], inputs_float32[ inputNumB ] ); - inputNumA = ( inputNumA + 1 ) & ( numInputs_float32 - 1 ); - if ( inputNumA == 0 ) ++inputNumB; - inputNumB = ( inputNumB + 1 ) & ( numInputs_float32 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNumA = 0; - inputNumB = 0; - startClock = clock(); - for ( i = count; i; --i ) { - function( - inputs_float32[ inputNumA ], inputs_float32[ inputNumB ] ); - inputNumA = ( inputNumA + 1 ) & ( numInputs_float32 - 1 ); - if ( inputNumA == 0 ) ++inputNumB; - inputNumB = ( inputNumB + 1 ) & ( numInputs_float32 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -static void time_abz_float32( float32 function( float32, float32 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNumA, inputNumB; - - count = 0; - inputNumA = 0; - inputNumB = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - function( - inputs_float32[ inputNumA ], inputs_float32[ inputNumB ] ); - inputNumA = ( inputNumA + 1 ) & ( numInputs_float32 - 1 ); - if ( inputNumA == 0 ) ++inputNumB; - inputNumB = ( inputNumB + 1 ) & ( numInputs_float32 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNumA = 0; - inputNumB = 0; - startClock = clock(); - for ( i = count; i; --i ) { - function( - inputs_float32[ inputNumA ], inputs_float32[ inputNumB ] ); - inputNumA = ( inputNumA + 1 ) & ( numInputs_float32 - 1 ); - if ( inputNumA == 0 ) ++inputNumB; - inputNumB = ( inputNumB + 1 ) & ( numInputs_float32 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -static const float32 inputs_float32_pos[ numInputs_float32 ] = { - 0x4EFA0000, 0x41D0B328, 0x00000000, 0x3E69A31E, - 0x2F803EFF, 0x3F800000, 0x17BF8000, 0x674A301A, - 0x4E010003, 0x7EE3C75D, 0x3D803FE0, 0x3FFEFF00, - 0x7981F800, 0x431FFFFC, 0x4100C000, 0x3D87EFFF, - 0x4103FEFE, 0x3C000007, 0x3F01F7FF, 0x4E6C6B5C, - 0x4187FFFE, 0x458B9F13, 0x4F88007F, 0x5F004007, - 0x37FFD7FE, 0x7E8001FB, 0x46EFFBFF, 0x31C10000, - 0x5B428661, 0x33F89B1F, 0x23BFEFFF, 0x537BFFBE -}; - -static void time_az_float32_pos( float32 function( float32 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - function( inputs_float32_pos[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - function( inputs_float32_pos[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_float32 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -enum { - numInputs_float64 = 32 -}; - -static const float64 inputs_float64[ numInputs_float64 ] = { - LIT64( 0x422FFFC008000000 ), - LIT64( 0xB7E0000480000000 ), - LIT64( 0xF3FD2546120B7935 ), - LIT64( 0x3FF0000000000000 ), - LIT64( 0xCE07F766F09588D6 ), - LIT64( 0x8000000000000000 ), - LIT64( 0x3FCE000400000000 ), - LIT64( 0x8313B60F0032BED8 ), - LIT64( 0xC1EFFFFFC0002000 ), - LIT64( 0x3FB3C75D224F2B0F ), - LIT64( 0x7FD00000004000FF ), - LIT64( 0xA12FFF8000001FFF ), - LIT64( 0x3EE0000000FE0000 ), - LIT64( 0x0010000080000004 ), - LIT64( 0x41CFFFFE00000020 ), - LIT64( 0x40303FFFFFFFFFFD ), - LIT64( 0x3FD000003FEFFFFF ), - LIT64( 0xBFD0000010000000 ), - LIT64( 0xB7FC6B5C16CA55CF ), - LIT64( 0x413EEB940B9D1301 ), - LIT64( 0xC7E00200001FFFFF ), - LIT64( 0x47F00021FFFFFFFE ), - LIT64( 0xBFFFFFFFF80000FF ), - LIT64( 0xC07FFFFFE00FFFFF ), - LIT64( 0x001497A63740C5E8 ), - LIT64( 0xC4BFFFE0001FFFFF ), - LIT64( 0x96FFDFFEFFFFFFFF ), - LIT64( 0x403FC000000001FE ), - LIT64( 0xFFD00000000001F6 ), - LIT64( 0x0640400002000000 ), - LIT64( 0x479CEE1E4F789FE0 ), - LIT64( 0xC237FFFFFFFFFDFE ) -}; - -static void time_a_float64_z_int32( int32 function( float64 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - function( inputs_float64[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - function( inputs_float64[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -static void time_a_float64_z_int64( int64 function( float64 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - function( inputs_float64[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - function( inputs_float64[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -static void time_a_float64_z_float32( float32 function( float64 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - function( inputs_float64[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - function( inputs_float64[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -#ifdef FLOATX80 - -static void time_a_float64_z_floatx80( floatx80 function( float64 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - function( inputs_float64[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - function( inputs_float64[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -#endif - -#ifdef FLOAT128 - -static void time_a_float64_z_float128( float128 function( float64 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - function( inputs_float64[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - function( inputs_float64[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -#endif - -static void time_az_float64( float64 function( float64 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - function( inputs_float64[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - function( inputs_float64[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -static void time_ab_float64_z_flag( flag function( float64, float64 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNumA, inputNumB; - - count = 0; - inputNumA = 0; - inputNumB = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - function( - inputs_float64[ inputNumA ], inputs_float64[ inputNumB ] ); - inputNumA = ( inputNumA + 1 ) & ( numInputs_float64 - 1 ); - if ( inputNumA == 0 ) ++inputNumB; - inputNumB = ( inputNumB + 1 ) & ( numInputs_float64 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNumA = 0; - inputNumB = 0; - startClock = clock(); - for ( i = count; i; --i ) { - function( - inputs_float64[ inputNumA ], inputs_float64[ inputNumB ] ); - inputNumA = ( inputNumA + 1 ) & ( numInputs_float64 - 1 ); - if ( inputNumA == 0 ) ++inputNumB; - inputNumB = ( inputNumB + 1 ) & ( numInputs_float64 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -static void time_abz_float64( float64 function( float64, float64 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNumA, inputNumB; - - count = 0; - inputNumA = 0; - inputNumB = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - function( - inputs_float64[ inputNumA ], inputs_float64[ inputNumB ] ); - inputNumA = ( inputNumA + 1 ) & ( numInputs_float64 - 1 ); - if ( inputNumA == 0 ) ++inputNumB; - inputNumB = ( inputNumB + 1 ) & ( numInputs_float64 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNumA = 0; - inputNumB = 0; - startClock = clock(); - for ( i = count; i; --i ) { - function( - inputs_float64[ inputNumA ], inputs_float64[ inputNumB ] ); - inputNumA = ( inputNumA + 1 ) & ( numInputs_float64 - 1 ); - if ( inputNumA == 0 ) ++inputNumB; - inputNumB = ( inputNumB + 1 ) & ( numInputs_float64 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -static const float64 inputs_float64_pos[ numInputs_float64 ] = { - LIT64( 0x422FFFC008000000 ), - LIT64( 0x37E0000480000000 ), - LIT64( 0x73FD2546120B7935 ), - LIT64( 0x3FF0000000000000 ), - LIT64( 0x4E07F766F09588D6 ), - LIT64( 0x0000000000000000 ), - LIT64( 0x3FCE000400000000 ), - LIT64( 0x0313B60F0032BED8 ), - LIT64( 0x41EFFFFFC0002000 ), - LIT64( 0x3FB3C75D224F2B0F ), - LIT64( 0x7FD00000004000FF ), - LIT64( 0x212FFF8000001FFF ), - LIT64( 0x3EE0000000FE0000 ), - LIT64( 0x0010000080000004 ), - LIT64( 0x41CFFFFE00000020 ), - LIT64( 0x40303FFFFFFFFFFD ), - LIT64( 0x3FD000003FEFFFFF ), - LIT64( 0x3FD0000010000000 ), - LIT64( 0x37FC6B5C16CA55CF ), - LIT64( 0x413EEB940B9D1301 ), - LIT64( 0x47E00200001FFFFF ), - LIT64( 0x47F00021FFFFFFFE ), - LIT64( 0x3FFFFFFFF80000FF ), - LIT64( 0x407FFFFFE00FFFFF ), - LIT64( 0x001497A63740C5E8 ), - LIT64( 0x44BFFFE0001FFFFF ), - LIT64( 0x16FFDFFEFFFFFFFF ), - LIT64( 0x403FC000000001FE ), - LIT64( 0x7FD00000000001F6 ), - LIT64( 0x0640400002000000 ), - LIT64( 0x479CEE1E4F789FE0 ), - LIT64( 0x4237FFFFFFFFFDFE ) -}; - -static void time_az_float64_pos( float64 function( float64 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - function( inputs_float64_pos[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - function( inputs_float64_pos[ inputNum ] ); - inputNum = ( inputNum + 1 ) & ( numInputs_float64 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -#ifdef FLOATX80 - -enum { - numInputs_floatx80 = 32 -}; - -static const struct { - bits16 high; - bits64 low; -} inputs_floatx80[ numInputs_floatx80 ] = { - { 0xC03F, LIT64( 0xA9BE15A19C1E8B62 ) }, - { 0x8000, LIT64( 0x0000000000000000 ) }, - { 0x75A8, LIT64( 0xE59591E4788957A5 ) }, - { 0xBFFF, LIT64( 0xFFF0000000000040 ) }, - { 0x0CD8, LIT64( 0xFC000000000007FE ) }, - { 0x43BA, LIT64( 0x99A4000000000000 ) }, - { 0x3FFF, LIT64( 0x8000000000000000 ) }, - { 0x4081, LIT64( 0x94FBF1BCEB5545F0 ) }, - { 0x403E, LIT64( 0xFFF0000000002000 ) }, - { 0x3FFE, LIT64( 0xC860E3C75D224F28 ) }, - { 0x407E, LIT64( 0xFC00000FFFFFFFFE ) }, - { 0x737A, LIT64( 0x800000007FFDFFFE ) }, - { 0x4044, LIT64( 0xFFFFFF80000FFFFF ) }, - { 0xBBFE, LIT64( 0x8000040000001FFE ) }, - { 0xC002, LIT64( 0xFF80000000000020 ) }, - { 0xDE8D, LIT64( 0xFFFFFFFFFFE00004 ) }, - { 0xC004, LIT64( 0x8000000000003FFB ) }, - { 0x407F, LIT64( 0x800000000003FFFE ) }, - { 0xC000, LIT64( 0xA459EE6A5C16CA55 ) }, - { 0x8003, LIT64( 0xC42CBF7399AEEB94 ) }, - { 0xBF7F, LIT64( 0xF800000000000006 ) }, - { 0xC07F, LIT64( 0xBF56BE8871F28FEA ) }, - { 0xC07E, LIT64( 0xFFFF77FFFFFFFFFE ) }, - { 0xADC9, LIT64( 0x8000000FFFFFFFDE ) }, - { 0xC001, LIT64( 0xEFF7FFFFFFFFFFFF ) }, - { 0x4001, LIT64( 0xBE84F30125C497A6 ) }, - { 0xC06B, LIT64( 0xEFFFFFFFFFFFFFFF ) }, - { 0x4080, LIT64( 0xFFFFFFFFBFFFFFFF ) }, - { 0x87E9, LIT64( 0x81FFFFFFFFFFFBFF ) }, - { 0xA63F, LIT64( 0x801FFFFFFEFFFFFE ) }, - { 0x403C, LIT64( 0x801FFFFFFFF7FFFF ) }, - { 0x4018, LIT64( 0x8000000000080003 ) } -}; - -static void time_a_floatx80_z_int32( int32 function( floatx80 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - floatx80 a; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - a.low = inputs_floatx80[ inputNum ].low; - a.high = inputs_floatx80[ inputNum ].high; - function( a ); - inputNum = ( inputNum + 1 ) & ( numInputs_floatx80 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - a.low = inputs_floatx80[ inputNum ].low; - a.high = inputs_floatx80[ inputNum ].high; - function( a ); - inputNum = ( inputNum + 1 ) & ( numInputs_floatx80 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -static void time_a_floatx80_z_int64( int64 function( floatx80 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - floatx80 a; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - a.low = inputs_floatx80[ inputNum ].low; - a.high = inputs_floatx80[ inputNum ].high; - function( a ); - inputNum = ( inputNum + 1 ) & ( numInputs_floatx80 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - a.low = inputs_floatx80[ inputNum ].low; - a.high = inputs_floatx80[ inputNum ].high; - function( a ); - inputNum = ( inputNum + 1 ) & ( numInputs_floatx80 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -static void time_a_floatx80_z_float32( float32 function( floatx80 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - floatx80 a; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - a.low = inputs_floatx80[ inputNum ].low; - a.high = inputs_floatx80[ inputNum ].high; - function( a ); - inputNum = ( inputNum + 1 ) & ( numInputs_floatx80 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - a.low = inputs_floatx80[ inputNum ].low; - a.high = inputs_floatx80[ inputNum ].high; - function( a ); - inputNum = ( inputNum + 1 ) & ( numInputs_floatx80 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -static void time_a_floatx80_z_float64( float64 function( floatx80 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - floatx80 a; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - a.low = inputs_floatx80[ inputNum ].low; - a.high = inputs_floatx80[ inputNum ].high; - function( a ); - inputNum = ( inputNum + 1 ) & ( numInputs_floatx80 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - a.low = inputs_floatx80[ inputNum ].low; - a.high = inputs_floatx80[ inputNum ].high; - function( a ); - inputNum = ( inputNum + 1 ) & ( numInputs_floatx80 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -#ifdef FLOAT128 - -static void time_a_floatx80_z_float128( float128 function( floatx80 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - floatx80 a; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - a.low = inputs_floatx80[ inputNum ].low; - a.high = inputs_floatx80[ inputNum ].high; - function( a ); - inputNum = ( inputNum + 1 ) & ( numInputs_floatx80 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - a.low = inputs_floatx80[ inputNum ].low; - a.high = inputs_floatx80[ inputNum ].high; - function( a ); - inputNum = ( inputNum + 1 ) & ( numInputs_floatx80 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -#endif - -static void time_az_floatx80( floatx80 function( floatx80 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - floatx80 a; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - a.low = inputs_floatx80[ inputNum ].low; - a.high = inputs_floatx80[ inputNum ].high; - function( a ); - inputNum = ( inputNum + 1 ) & ( numInputs_floatx80 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - a.low = inputs_floatx80[ inputNum ].low; - a.high = inputs_floatx80[ inputNum ].high; - function( a ); - inputNum = ( inputNum + 1 ) & ( numInputs_floatx80 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -static void time_ab_floatx80_z_flag( flag function( floatx80, floatx80 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNumA, inputNumB; - floatx80 a, b; - - count = 0; - inputNumA = 0; - inputNumB = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - a.low = inputs_floatx80[ inputNumA ].low; - a.high = inputs_floatx80[ inputNumA ].high; - b.low = inputs_floatx80[ inputNumB ].low; - b.high = inputs_floatx80[ inputNumB ].high; - function( a, b ); - inputNumA = ( inputNumA + 1 ) & ( numInputs_floatx80 - 1 ); - if ( inputNumA == 0 ) ++inputNumB; - inputNumB = ( inputNumB + 1 ) & ( numInputs_floatx80 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNumA = 0; - inputNumB = 0; - startClock = clock(); - for ( i = count; i; --i ) { - a.low = inputs_floatx80[ inputNumA ].low; - a.high = inputs_floatx80[ inputNumA ].high; - b.low = inputs_floatx80[ inputNumB ].low; - b.high = inputs_floatx80[ inputNumB ].high; - function( a, b ); - inputNumA = ( inputNumA + 1 ) & ( numInputs_floatx80 - 1 ); - if ( inputNumA == 0 ) ++inputNumB; - inputNumB = ( inputNumB + 1 ) & ( numInputs_floatx80 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -static void time_abz_floatx80( floatx80 function( floatx80, floatx80 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNumA, inputNumB; - floatx80 a, b; - - count = 0; - inputNumA = 0; - inputNumB = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - a.low = inputs_floatx80[ inputNumA ].low; - a.high = inputs_floatx80[ inputNumA ].high; - b.low = inputs_floatx80[ inputNumB ].low; - b.high = inputs_floatx80[ inputNumB ].high; - function( a, b ); - inputNumA = ( inputNumA + 1 ) & ( numInputs_floatx80 - 1 ); - if ( inputNumA == 0 ) ++inputNumB; - inputNumB = ( inputNumB + 1 ) & ( numInputs_floatx80 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNumA = 0; - inputNumB = 0; - startClock = clock(); - for ( i = count; i; --i ) { - a.low = inputs_floatx80[ inputNumA ].low; - a.high = inputs_floatx80[ inputNumA ].high; - b.low = inputs_floatx80[ inputNumB ].low; - b.high = inputs_floatx80[ inputNumB ].high; - function( a, b ); - inputNumA = ( inputNumA + 1 ) & ( numInputs_floatx80 - 1 ); - if ( inputNumA == 0 ) ++inputNumB; - inputNumB = ( inputNumB + 1 ) & ( numInputs_floatx80 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -static const struct { - bits16 high; - bits64 low; -} inputs_floatx80_pos[ numInputs_floatx80 ] = { - { 0x403F, LIT64( 0xA9BE15A19C1E8B62 ) }, - { 0x0000, LIT64( 0x0000000000000000 ) }, - { 0x75A8, LIT64( 0xE59591E4788957A5 ) }, - { 0x3FFF, LIT64( 0xFFF0000000000040 ) }, - { 0x0CD8, LIT64( 0xFC000000000007FE ) }, - { 0x43BA, LIT64( 0x99A4000000000000 ) }, - { 0x3FFF, LIT64( 0x8000000000000000 ) }, - { 0x4081, LIT64( 0x94FBF1BCEB5545F0 ) }, - { 0x403E, LIT64( 0xFFF0000000002000 ) }, - { 0x3FFE, LIT64( 0xC860E3C75D224F28 ) }, - { 0x407E, LIT64( 0xFC00000FFFFFFFFE ) }, - { 0x737A, LIT64( 0x800000007FFDFFFE ) }, - { 0x4044, LIT64( 0xFFFFFF80000FFFFF ) }, - { 0x3BFE, LIT64( 0x8000040000001FFE ) }, - { 0x4002, LIT64( 0xFF80000000000020 ) }, - { 0x5E8D, LIT64( 0xFFFFFFFFFFE00004 ) }, - { 0x4004, LIT64( 0x8000000000003FFB ) }, - { 0x407F, LIT64( 0x800000000003FFFE ) }, - { 0x4000, LIT64( 0xA459EE6A5C16CA55 ) }, - { 0x0003, LIT64( 0xC42CBF7399AEEB94 ) }, - { 0x3F7F, LIT64( 0xF800000000000006 ) }, - { 0x407F, LIT64( 0xBF56BE8871F28FEA ) }, - { 0x407E, LIT64( 0xFFFF77FFFFFFFFFE ) }, - { 0x2DC9, LIT64( 0x8000000FFFFFFFDE ) }, - { 0x4001, LIT64( 0xEFF7FFFFFFFFFFFF ) }, - { 0x4001, LIT64( 0xBE84F30125C497A6 ) }, - { 0x406B, LIT64( 0xEFFFFFFFFFFFFFFF ) }, - { 0x4080, LIT64( 0xFFFFFFFFBFFFFFFF ) }, - { 0x07E9, LIT64( 0x81FFFFFFFFFFFBFF ) }, - { 0x263F, LIT64( 0x801FFFFFFEFFFFFE ) }, - { 0x403C, LIT64( 0x801FFFFFFFF7FFFF ) }, - { 0x4018, LIT64( 0x8000000000080003 ) } -}; - -static void time_az_floatx80_pos( floatx80 function( floatx80 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - floatx80 a; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - a.low = inputs_floatx80_pos[ inputNum ].low; - a.high = inputs_floatx80_pos[ inputNum ].high; - function( a ); - inputNum = ( inputNum + 1 ) & ( numInputs_floatx80 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - a.low = inputs_floatx80_pos[ inputNum ].low; - a.high = inputs_floatx80_pos[ inputNum ].high; - function( a ); - inputNum = ( inputNum + 1 ) & ( numInputs_floatx80 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -#endif - -#ifdef FLOAT128 - -enum { - numInputs_float128 = 32 -}; - -static const struct { - bits64 high, low; -} inputs_float128[ numInputs_float128 ] = { - { LIT64( 0x3FDA200000100000 ), LIT64( 0x0000000000000000 ) }, - { LIT64( 0x3FFF000000000000 ), LIT64( 0x0000000000000000 ) }, - { LIT64( 0x85F14776190C8306 ), LIT64( 0xD8715F4E3D54BB92 ) }, - { LIT64( 0xF2B00000007FFFFF ), LIT64( 0xFFFFFFFFFFF7FFFF ) }, - { LIT64( 0x8000000000000000 ), LIT64( 0x0000000000000000 ) }, - { LIT64( 0xBFFFFFFFFFE00000 ), LIT64( 0x0000008000000000 ) }, - { LIT64( 0x407F1719CE722F3E ), LIT64( 0xDA6B3FE5FF29425B ) }, - { LIT64( 0x43FFFF8000000000 ), LIT64( 0x0000000000400000 ) }, - { LIT64( 0x401E000000000100 ), LIT64( 0x0000000000002000 ) }, - { LIT64( 0x3FFED71DACDA8E47 ), LIT64( 0x4860E3C75D224F28 ) }, - { LIT64( 0xBF7ECFC1E90647D1 ), LIT64( 0x7A124FE55623EE44 ) }, - { LIT64( 0x0DF7007FFFFFFFFF ), LIT64( 0xFFFFFFFFEFFFFFFF ) }, - { LIT64( 0x3FE5FFEFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFEFFF ) }, - { LIT64( 0x403FFFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFBFE ) }, - { LIT64( 0xBFFB2FBF7399AFEB ), LIT64( 0xA459EE6A5C16CA55 ) }, - { LIT64( 0xBDB8FFFFFFFFFFFC ), LIT64( 0x0000000000000400 ) }, - { LIT64( 0x3FC8FFDFFFFFFFFF ), LIT64( 0xFFFFFFFFF0000000 ) }, - { LIT64( 0x3FFBFFFFFFDFFFFF ), LIT64( 0xFFF8000000000000 ) }, - { LIT64( 0x407043C11737BE84 ), LIT64( 0xDDD58212ADC937F4 ) }, - { LIT64( 0x8001000000000000 ), LIT64( 0x0000001000000001 ) }, - { LIT64( 0xC036FFFFFFFFFFFF ), LIT64( 0xFE40000000000000 ) }, - { LIT64( 0x4002FFFFFE000002 ), LIT64( 0x0000000000000000 ) }, - { LIT64( 0x4000C3FEDE897773 ), LIT64( 0x326AC4FD8EFBE6DC ) }, - { LIT64( 0xBFFF0000000FFFFF ), LIT64( 0xFFFFFE0000000000 ) }, - { LIT64( 0x62C3E502146E426D ), LIT64( 0x43F3CAA0DC7DF1A0 ) }, - { LIT64( 0xB5CBD32E52BB570E ), LIT64( 0xBCC477CB11C6236C ) }, - { LIT64( 0xE228FFFFFFC00000 ), LIT64( 0x0000000000000000 ) }, - { LIT64( 0x3F80000000000000 ), LIT64( 0x0000000080000008 ) }, - { LIT64( 0xC1AFFFDFFFFFFFFF ), LIT64( 0xFFFC000000000000 ) }, - { LIT64( 0xC96F000000000000 ), LIT64( 0x00000001FFFBFFFF ) }, - { LIT64( 0x3DE09BFE7923A338 ), LIT64( 0xBCC8FBBD7CEC1F4F ) }, - { LIT64( 0x401CFFFFFFFFFFFF ), LIT64( 0xFFFFFFFEFFFFFF80 ) } -}; - -static void time_a_float128_z_int32( int32 function( float128 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - float128 a; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - a.low = inputs_float128[ inputNum ].low; - a.high = inputs_float128[ inputNum ].high; - function( a ); - inputNum = ( inputNum + 1 ) & ( numInputs_float128 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - a.low = inputs_float128[ inputNum ].low; - a.high = inputs_float128[ inputNum ].high; - function( a ); - inputNum = ( inputNum + 1 ) & ( numInputs_float128 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -static void time_a_float128_z_int64( int64 function( float128 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - float128 a; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - a.low = inputs_float128[ inputNum ].low; - a.high = inputs_float128[ inputNum ].high; - function( a ); - inputNum = ( inputNum + 1 ) & ( numInputs_float128 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - a.low = inputs_float128[ inputNum ].low; - a.high = inputs_float128[ inputNum ].high; - function( a ); - inputNum = ( inputNum + 1 ) & ( numInputs_float128 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -static void time_a_float128_z_float32( float32 function( float128 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - float128 a; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - a.low = inputs_float128[ inputNum ].low; - a.high = inputs_float128[ inputNum ].high; - function( a ); - inputNum = ( inputNum + 1 ) & ( numInputs_float128 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - a.low = inputs_float128[ inputNum ].low; - a.high = inputs_float128[ inputNum ].high; - function( a ); - inputNum = ( inputNum + 1 ) & ( numInputs_float128 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -static void time_a_float128_z_float64( float64 function( float128 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - float128 a; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - a.low = inputs_float128[ inputNum ].low; - a.high = inputs_float128[ inputNum ].high; - function( a ); - inputNum = ( inputNum + 1 ) & ( numInputs_float128 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - a.low = inputs_float128[ inputNum ].low; - a.high = inputs_float128[ inputNum ].high; - function( a ); - inputNum = ( inputNum + 1 ) & ( numInputs_float128 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -#ifdef FLOATX80 - -static void time_a_float128_z_floatx80( floatx80 function( float128 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - float128 a; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - a.low = inputs_float128[ inputNum ].low; - a.high = inputs_float128[ inputNum ].high; - function( a ); - inputNum = ( inputNum + 1 ) & ( numInputs_float128 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - a.low = inputs_float128[ inputNum ].low; - a.high = inputs_float128[ inputNum ].high; - function( a ); - inputNum = ( inputNum + 1 ) & ( numInputs_float128 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -#endif - -static void time_az_float128( float128 function( float128 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - float128 a; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - a.low = inputs_float128[ inputNum ].low; - a.high = inputs_float128[ inputNum ].high; - function( a ); - inputNum = ( inputNum + 1 ) & ( numInputs_float128 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - a.low = inputs_float128[ inputNum ].low; - a.high = inputs_float128[ inputNum ].high; - function( a ); - inputNum = ( inputNum + 1 ) & ( numInputs_float128 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -static void time_ab_float128_z_flag( flag function( float128, float128 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNumA, inputNumB; - float128 a, b; - - count = 0; - inputNumA = 0; - inputNumB = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - a.low = inputs_float128[ inputNumA ].low; - a.high = inputs_float128[ inputNumA ].high; - b.low = inputs_float128[ inputNumB ].low; - b.high = inputs_float128[ inputNumB ].high; - function( a, b ); - inputNumA = ( inputNumA + 1 ) & ( numInputs_float128 - 1 ); - if ( inputNumA == 0 ) ++inputNumB; - inputNumB = ( inputNumB + 1 ) & ( numInputs_float128 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNumA = 0; - inputNumB = 0; - startClock = clock(); - for ( i = count; i; --i ) { - a.low = inputs_float128[ inputNumA ].low; - a.high = inputs_float128[ inputNumA ].high; - b.low = inputs_float128[ inputNumB ].low; - b.high = inputs_float128[ inputNumB ].high; - function( a, b ); - inputNumA = ( inputNumA + 1 ) & ( numInputs_float128 - 1 ); - if ( inputNumA == 0 ) ++inputNumB; - inputNumB = ( inputNumB + 1 ) & ( numInputs_float128 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -static void time_abz_float128( float128 function( float128, float128 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNumA, inputNumB; - float128 a, b; - - count = 0; - inputNumA = 0; - inputNumB = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - a.low = inputs_float128[ inputNumA ].low; - a.high = inputs_float128[ inputNumA ].high; - b.low = inputs_float128[ inputNumB ].low; - b.high = inputs_float128[ inputNumB ].high; - function( a, b ); - inputNumA = ( inputNumA + 1 ) & ( numInputs_float128 - 1 ); - if ( inputNumA == 0 ) ++inputNumB; - inputNumB = ( inputNumB + 1 ) & ( numInputs_float128 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNumA = 0; - inputNumB = 0; - startClock = clock(); - for ( i = count; i; --i ) { - a.low = inputs_float128[ inputNumA ].low; - a.high = inputs_float128[ inputNumA ].high; - b.low = inputs_float128[ inputNumB ].low; - b.high = inputs_float128[ inputNumB ].high; - function( a, b ); - inputNumA = ( inputNumA + 1 ) & ( numInputs_float128 - 1 ); - if ( inputNumA == 0 ) ++inputNumB; - inputNumB = ( inputNumB + 1 ) & ( numInputs_float128 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -static const struct { - bits64 high, low; -} inputs_float128_pos[ numInputs_float128 ] = { - { LIT64( 0x3FDA200000100000 ), LIT64( 0x0000000000000000 ) }, - { LIT64( 0x3FFF000000000000 ), LIT64( 0x0000000000000000 ) }, - { LIT64( 0x05F14776190C8306 ), LIT64( 0xD8715F4E3D54BB92 ) }, - { LIT64( 0x72B00000007FFFFF ), LIT64( 0xFFFFFFFFFFF7FFFF ) }, - { LIT64( 0x0000000000000000 ), LIT64( 0x0000000000000000 ) }, - { LIT64( 0x3FFFFFFFFFE00000 ), LIT64( 0x0000008000000000 ) }, - { LIT64( 0x407F1719CE722F3E ), LIT64( 0xDA6B3FE5FF29425B ) }, - { LIT64( 0x43FFFF8000000000 ), LIT64( 0x0000000000400000 ) }, - { LIT64( 0x401E000000000100 ), LIT64( 0x0000000000002000 ) }, - { LIT64( 0x3FFED71DACDA8E47 ), LIT64( 0x4860E3C75D224F28 ) }, - { LIT64( 0x3F7ECFC1E90647D1 ), LIT64( 0x7A124FE55623EE44 ) }, - { LIT64( 0x0DF7007FFFFFFFFF ), LIT64( 0xFFFFFFFFEFFFFFFF ) }, - { LIT64( 0x3FE5FFEFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFEFFF ) }, - { LIT64( 0x403FFFFFFFFFFFFF ), LIT64( 0xFFFFFFFFFFFFFBFE ) }, - { LIT64( 0x3FFB2FBF7399AFEB ), LIT64( 0xA459EE6A5C16CA55 ) }, - { LIT64( 0x3DB8FFFFFFFFFFFC ), LIT64( 0x0000000000000400 ) }, - { LIT64( 0x3FC8FFDFFFFFFFFF ), LIT64( 0xFFFFFFFFF0000000 ) }, - { LIT64( 0x3FFBFFFFFFDFFFFF ), LIT64( 0xFFF8000000000000 ) }, - { LIT64( 0x407043C11737BE84 ), LIT64( 0xDDD58212ADC937F4 ) }, - { LIT64( 0x0001000000000000 ), LIT64( 0x0000001000000001 ) }, - { LIT64( 0x4036FFFFFFFFFFFF ), LIT64( 0xFE40000000000000 ) }, - { LIT64( 0x4002FFFFFE000002 ), LIT64( 0x0000000000000000 ) }, - { LIT64( 0x4000C3FEDE897773 ), LIT64( 0x326AC4FD8EFBE6DC ) }, - { LIT64( 0x3FFF0000000FFFFF ), LIT64( 0xFFFFFE0000000000 ) }, - { LIT64( 0x62C3E502146E426D ), LIT64( 0x43F3CAA0DC7DF1A0 ) }, - { LIT64( 0x35CBD32E52BB570E ), LIT64( 0xBCC477CB11C6236C ) }, - { LIT64( 0x6228FFFFFFC00000 ), LIT64( 0x0000000000000000 ) }, - { LIT64( 0x3F80000000000000 ), LIT64( 0x0000000080000008 ) }, - { LIT64( 0x41AFFFDFFFFFFFFF ), LIT64( 0xFFFC000000000000 ) }, - { LIT64( 0x496F000000000000 ), LIT64( 0x00000001FFFBFFFF ) }, - { LIT64( 0x3DE09BFE7923A338 ), LIT64( 0xBCC8FBBD7CEC1F4F ) }, - { LIT64( 0x401CFFFFFFFFFFFF ), LIT64( 0xFFFFFFFEFFFFFF80 ) } -}; - -static void time_az_float128_pos( float128 function( float128 ) ) -{ - clock_t startClock, endClock; - int32 count, i; - int8 inputNum; - float128 a; - - count = 0; - inputNum = 0; - startClock = clock(); - do { - for ( i = minIterations; i; --i ) { - a.low = inputs_float128_pos[ inputNum ].low; - a.high = inputs_float128_pos[ inputNum ].high; - function( a ); - inputNum = ( inputNum + 1 ) & ( numInputs_float128 - 1 ); - } - count += minIterations; - } while ( clock() - startClock < CLOCKS_PER_SEC ); - inputNum = 0; - startClock = clock(); - for ( i = count; i; --i ) { - a.low = inputs_float128_pos[ inputNum ].low; - a.high = inputs_float128_pos[ inputNum ].high; - function( a ); - inputNum = ( inputNum + 1 ) & ( numInputs_float128 - 1 ); - } - endClock = clock(); - reportTime( count, endClock - startClock ); - -} - -#endif - -enum { - INT32_TO_FLOAT32 = 1, - INT32_TO_FLOAT64, -#ifdef FLOATX80 - INT32_TO_FLOATX80, -#endif -#ifdef FLOAT128 - INT32_TO_FLOAT128, -#endif - INT64_TO_FLOAT32, - INT64_TO_FLOAT64, -#ifdef FLOATX80 - INT64_TO_FLOATX80, -#endif -#ifdef FLOAT128 - INT64_TO_FLOAT128, -#endif - FLOAT32_TO_INT32, - FLOAT32_TO_INT32_ROUND_TO_ZERO, - FLOAT32_TO_INT64, - FLOAT32_TO_INT64_ROUND_TO_ZERO, - FLOAT32_TO_FLOAT64, -#ifdef FLOATX80 - FLOAT32_TO_FLOATX80, -#endif -#ifdef FLOAT128 - FLOAT32_TO_FLOAT128, -#endif - FLOAT32_ROUND_TO_INT, - FLOAT32_ADD, - FLOAT32_SUB, - FLOAT32_MUL, - FLOAT32_DIV, - FLOAT32_REM, - FLOAT32_SQRT, - FLOAT32_EQ, - FLOAT32_LE, - FLOAT32_LT, - FLOAT32_EQ_SIGNALING, - FLOAT32_LE_QUIET, - FLOAT32_LT_QUIET, - FLOAT64_TO_INT32, - FLOAT64_TO_INT32_ROUND_TO_ZERO, - FLOAT64_TO_INT64, - FLOAT64_TO_INT64_ROUND_TO_ZERO, - FLOAT64_TO_FLOAT32, -#ifdef FLOATX80 - FLOAT64_TO_FLOATX80, -#endif -#ifdef FLOAT128 - FLOAT64_TO_FLOAT128, -#endif - FLOAT64_ROUND_TO_INT, - FLOAT64_ADD, - FLOAT64_SUB, - FLOAT64_MUL, - FLOAT64_DIV, - FLOAT64_REM, - FLOAT64_SQRT, - FLOAT64_EQ, - FLOAT64_LE, - FLOAT64_LT, - FLOAT64_EQ_SIGNALING, - FLOAT64_LE_QUIET, - FLOAT64_LT_QUIET, -#ifdef FLOATX80 - FLOATX80_TO_INT32, - FLOATX80_TO_INT32_ROUND_TO_ZERO, - FLOATX80_TO_INT64, - FLOATX80_TO_INT64_ROUND_TO_ZERO, - FLOATX80_TO_FLOAT32, - FLOATX80_TO_FLOAT64, -#ifdef FLOAT128 - FLOATX80_TO_FLOAT128, -#endif - FLOATX80_ROUND_TO_INT, - FLOATX80_ADD, - FLOATX80_SUB, - FLOATX80_MUL, - FLOATX80_DIV, - FLOATX80_REM, - FLOATX80_SQRT, - FLOATX80_EQ, - FLOATX80_LE, - FLOATX80_LT, - FLOATX80_EQ_SIGNALING, - FLOATX80_LE_QUIET, - FLOATX80_LT_QUIET, -#endif -#ifdef FLOAT128 - FLOAT128_TO_INT32, - FLOAT128_TO_INT32_ROUND_TO_ZERO, - FLOAT128_TO_INT64, - FLOAT128_TO_INT64_ROUND_TO_ZERO, - FLOAT128_TO_FLOAT32, - FLOAT128_TO_FLOAT64, -#ifdef FLOATX80 - FLOAT128_TO_FLOATX80, -#endif - FLOAT128_ROUND_TO_INT, - FLOAT128_ADD, - FLOAT128_SUB, - FLOAT128_MUL, - FLOAT128_DIV, - FLOAT128_REM, - FLOAT128_SQRT, - FLOAT128_EQ, - FLOAT128_LE, - FLOAT128_LT, - FLOAT128_EQ_SIGNALING, - FLOAT128_LE_QUIET, - FLOAT128_LT_QUIET, -#endif - NUM_FUNCTIONS -}; - -static struct { - char *name; - int8 numInputs; - flag roundingPrecision, roundingMode; - flag tininessMode, tininessModeAtReducedPrecision; -} functions[ NUM_FUNCTIONS ] = { - { 0, 0, 0, 0, 0, 0 }, - { "int32_to_float32", 1, FALSE, TRUE, FALSE, FALSE }, - { "int32_to_float64", 1, FALSE, FALSE, FALSE, FALSE }, -#ifdef FLOATX80 - { "int32_to_floatx80", 1, FALSE, FALSE, FALSE, FALSE }, -#endif -#ifdef FLOAT128 - { "int32_to_float128", 1, FALSE, FALSE, FALSE, FALSE }, -#endif - { "int64_to_float32", 1, FALSE, TRUE, FALSE, FALSE }, - { "int64_to_float64", 1, FALSE, TRUE, FALSE, FALSE }, -#ifdef FLOATX80 - { "int64_to_floatx80", 1, FALSE, FALSE, FALSE, FALSE }, -#endif -#ifdef FLOAT128 - { "int64_to_float128", 1, FALSE, FALSE, FALSE, FALSE }, -#endif - { "float32_to_int32", 1, FALSE, TRUE, FALSE, FALSE }, - { "float32_to_int32_round_to_zero", 1, FALSE, FALSE, FALSE, FALSE }, - { "float32_to_int64", 1, FALSE, TRUE, FALSE, FALSE }, - { "float32_to_int64_round_to_zero", 1, FALSE, FALSE, FALSE, FALSE }, - { "float32_to_float64", 1, FALSE, FALSE, FALSE, FALSE }, -#ifdef FLOATX80 - { "float32_to_floatx80", 1, FALSE, FALSE, FALSE, FALSE }, -#endif -#ifdef FLOAT128 - { "float32_to_float128", 1, FALSE, FALSE, FALSE, FALSE }, -#endif - { "float32_round_to_int", 1, FALSE, TRUE, FALSE, FALSE }, - { "float32_add", 2, FALSE, TRUE, FALSE, FALSE }, - { "float32_sub", 2, FALSE, TRUE, FALSE, FALSE }, - { "float32_mul", 2, FALSE, TRUE, TRUE, FALSE }, - { "float32_div", 2, FALSE, TRUE, FALSE, FALSE }, - { "float32_rem", 2, FALSE, FALSE, FALSE, FALSE }, - { "float32_sqrt", 1, FALSE, TRUE, FALSE, FALSE }, - { "float32_eq", 2, FALSE, FALSE, FALSE, FALSE }, - { "float32_le", 2, FALSE, FALSE, FALSE, FALSE }, - { "float32_lt", 2, FALSE, FALSE, FALSE, FALSE }, - { "float32_eq_signaling", 2, FALSE, FALSE, FALSE, FALSE }, - { "float32_le_quiet", 2, FALSE, FALSE, FALSE, FALSE }, - { "float32_lt_quiet", 2, FALSE, FALSE, FALSE, FALSE }, - { "float64_to_int32", 1, FALSE, TRUE, FALSE, FALSE }, - { "float64_to_int32_round_to_zero", 1, FALSE, FALSE, FALSE, FALSE }, - { "float64_to_int64", 1, FALSE, TRUE, FALSE, FALSE }, - { "float64_to_int64_round_to_zero", 1, FALSE, FALSE, FALSE, FALSE }, - { "float64_to_float32", 1, FALSE, TRUE, TRUE, FALSE }, -#ifdef FLOATX80 - { "float64_to_floatx80", 1, FALSE, FALSE, FALSE, FALSE }, -#endif -#ifdef FLOAT128 - { "float64_to_float128", 1, FALSE, FALSE, FALSE, FALSE }, -#endif - { "float64_round_to_int", 1, FALSE, TRUE, FALSE, FALSE }, - { "float64_add", 2, FALSE, TRUE, FALSE, FALSE }, - { "float64_sub", 2, FALSE, TRUE, FALSE, FALSE }, - { "float64_mul", 2, FALSE, TRUE, TRUE, FALSE }, - { "float64_div", 2, FALSE, TRUE, FALSE, FALSE }, - { "float64_rem", 2, FALSE, FALSE, FALSE, FALSE }, - { "float64_sqrt", 1, FALSE, TRUE, FALSE, FALSE }, - { "float64_eq", 2, FALSE, FALSE, FALSE, FALSE }, - { "float64_le", 2, FALSE, FALSE, FALSE, FALSE }, - { "float64_lt", 2, FALSE, FALSE, FALSE, FALSE }, - { "float64_eq_signaling", 2, FALSE, FALSE, FALSE, FALSE }, - { "float64_le_quiet", 2, FALSE, FALSE, FALSE, FALSE }, - { "float64_lt_quiet", 2, FALSE, FALSE, FALSE, FALSE }, -#ifdef FLOATX80 - { "floatx80_to_int32", 1, FALSE, TRUE, FALSE, FALSE }, - { "floatx80_to_int32_round_to_zero", 1, FALSE, FALSE, FALSE, FALSE }, - { "floatx80_to_int64", 1, FALSE, TRUE, FALSE, FALSE }, - { "floatx80_to_int64_round_to_zero", 1, FALSE, FALSE, FALSE, FALSE }, - { "floatx80_to_float32", 1, FALSE, TRUE, TRUE, FALSE }, - { "floatx80_to_float64", 1, FALSE, TRUE, TRUE, FALSE }, -#ifdef FLOAT128 - { "floatx80_to_float128", 1, FALSE, FALSE, FALSE, FALSE }, -#endif - { "floatx80_round_to_int", 1, FALSE, TRUE, FALSE, FALSE }, - { "floatx80_add", 2, TRUE, TRUE, FALSE, TRUE }, - { "floatx80_sub", 2, TRUE, TRUE, FALSE, TRUE }, - { "floatx80_mul", 2, TRUE, TRUE, TRUE, TRUE }, - { "floatx80_div", 2, TRUE, TRUE, FALSE, TRUE }, - { "floatx80_rem", 2, FALSE, FALSE, FALSE, FALSE }, - { "floatx80_sqrt", 1, TRUE, TRUE, FALSE, FALSE }, - { "floatx80_eq", 2, FALSE, FALSE, FALSE, FALSE }, - { "floatx80_le", 2, FALSE, FALSE, FALSE, FALSE }, - { "floatx80_lt", 2, FALSE, FALSE, FALSE, FALSE }, - { "floatx80_eq_signaling", 2, FALSE, FALSE, FALSE, FALSE }, - { "floatx80_le_quiet", 2, FALSE, FALSE, FALSE, FALSE }, - { "floatx80_lt_quiet", 2, FALSE, FALSE, FALSE, FALSE }, -#endif -#ifdef FLOAT128 - { "float128_to_int32", 1, FALSE, TRUE, FALSE, FALSE }, - { "float128_to_int32_round_to_zero", 1, FALSE, FALSE, FALSE, FALSE }, - { "float128_to_int64", 1, FALSE, TRUE, FALSE, FALSE }, - { "float128_to_int64_round_to_zero", 1, FALSE, FALSE, FALSE, FALSE }, - { "float128_to_float32", 1, FALSE, TRUE, TRUE, FALSE }, - { "float128_to_float64", 1, FALSE, TRUE, TRUE, FALSE }, -#ifdef FLOATX80 - { "float128_to_floatx80", 1, FALSE, TRUE, TRUE, FALSE }, -#endif - { "float128_round_to_int", 1, FALSE, TRUE, FALSE, FALSE }, - { "float128_add", 2, FALSE, TRUE, FALSE, FALSE }, - { "float128_sub", 2, FALSE, TRUE, FALSE, FALSE }, - { "float128_mul", 2, FALSE, TRUE, TRUE, FALSE }, - { "float128_div", 2, FALSE, TRUE, FALSE, FALSE }, - { "float128_rem", 2, FALSE, FALSE, FALSE, FALSE }, - { "float128_sqrt", 1, FALSE, TRUE, FALSE, FALSE }, - { "float128_eq", 2, FALSE, FALSE, FALSE, FALSE }, - { "float128_le", 2, FALSE, FALSE, FALSE, FALSE }, - { "float128_lt", 2, FALSE, FALSE, FALSE, FALSE }, - { "float128_eq_signaling", 2, FALSE, FALSE, FALSE, FALSE }, - { "float128_le_quiet", 2, FALSE, FALSE, FALSE, FALSE }, - { "float128_lt_quiet", 2, FALSE, FALSE, FALSE, FALSE }, -#endif -}; - -enum { - ROUND_NEAREST_EVEN = 1, - ROUND_TO_ZERO, - ROUND_DOWN, - ROUND_UP, - NUM_ROUNDINGMODES -}; -enum { - TININESS_BEFORE_ROUNDING = 1, - TININESS_AFTER_ROUNDING, - NUM_TININESSMODES -}; - -static void - timeFunctionVariety( - uint8 functionCode, - int8 roundingPrecision, - int8 roundingMode, - int8 tininessMode - ) -{ - uint8 roundingCode; - int8 tininessCode; - - functionName = functions[ functionCode ].name; - if ( roundingPrecision == 32 ) { - roundingPrecisionName = "32"; - } - else if ( roundingPrecision == 64 ) { - roundingPrecisionName = "64"; - } - else if ( roundingPrecision == 80 ) { - roundingPrecisionName = "80"; - } - else { - roundingPrecisionName = 0; - } -#ifdef FLOATX80 - floatx80_rounding_precision = roundingPrecision; -#endif - switch ( roundingMode ) { - case 0: - roundingModeName = 0; - roundingCode = float_round_nearest_even; - break; - case ROUND_NEAREST_EVEN: - roundingModeName = "nearest_even"; - roundingCode = float_round_nearest_even; - break; - case ROUND_TO_ZERO: - roundingModeName = "to_zero"; - roundingCode = float_round_to_zero; - break; - case ROUND_DOWN: - roundingModeName = "down"; - roundingCode = float_round_down; - break; - case ROUND_UP: - roundingModeName = "up"; - roundingCode = float_round_up; - break; - } - float_rounding_mode = roundingCode; - switch ( tininessMode ) { - case 0: - tininessModeName = 0; - tininessCode = float_tininess_after_rounding; - break; - case TININESS_BEFORE_ROUNDING: - tininessModeName = "before"; - tininessCode = float_tininess_before_rounding; - break; - case TININESS_AFTER_ROUNDING: - tininessModeName = "after"; - tininessCode = float_tininess_after_rounding; - break; - } - float_detect_tininess = tininessCode; - switch ( functionCode ) { - case INT32_TO_FLOAT32: - time_a_int32_z_float32( int32_to_float32 ); - break; - case INT32_TO_FLOAT64: - time_a_int32_z_float64( int32_to_float64 ); - break; -#ifdef FLOATX80 - case INT32_TO_FLOATX80: - time_a_int32_z_floatx80( int32_to_floatx80 ); - break; -#endif -#ifdef FLOAT128 - case INT32_TO_FLOAT128: - time_a_int32_z_float128( int32_to_float128 ); - break; -#endif - case INT64_TO_FLOAT32: - time_a_int64_z_float32( int64_to_float32 ); - break; - case INT64_TO_FLOAT64: - time_a_int64_z_float64( int64_to_float64 ); - break; -#ifdef FLOATX80 - case INT64_TO_FLOATX80: - time_a_int64_z_floatx80( int64_to_floatx80 ); - break; -#endif -#ifdef FLOAT128 - case INT64_TO_FLOAT128: - time_a_int64_z_float128( int64_to_float128 ); - break; -#endif - case FLOAT32_TO_INT32: - time_a_float32_z_int32( float32_to_int32 ); - break; - case FLOAT32_TO_INT32_ROUND_TO_ZERO: - time_a_float32_z_int32( float32_to_int32_round_to_zero ); - break; - case FLOAT32_TO_INT64: - time_a_float32_z_int64( float32_to_int64 ); - break; - case FLOAT32_TO_INT64_ROUND_TO_ZERO: - time_a_float32_z_int64( float32_to_int64_round_to_zero ); - break; - case FLOAT32_TO_FLOAT64: - time_a_float32_z_float64( float32_to_float64 ); - break; -#ifdef FLOATX80 - case FLOAT32_TO_FLOATX80: - time_a_float32_z_floatx80( float32_to_floatx80 ); - break; -#endif -#ifdef FLOAT128 - case FLOAT32_TO_FLOAT128: - time_a_float32_z_float128( float32_to_float128 ); - break; -#endif - case FLOAT32_ROUND_TO_INT: - time_az_float32( float32_round_to_int ); - break; - case FLOAT32_ADD: - time_abz_float32( float32_add ); - break; - case FLOAT32_SUB: - time_abz_float32( float32_sub ); - break; - case FLOAT32_MUL: - time_abz_float32( float32_mul ); - break; - case FLOAT32_DIV: - time_abz_float32( float32_div ); - break; - case FLOAT32_REM: - time_abz_float32( float32_rem ); - break; - case FLOAT32_SQRT: - time_az_float32_pos( float32_sqrt ); - break; - case FLOAT32_EQ: - time_ab_float32_z_flag( float32_eq ); - break; - case FLOAT32_LE: - time_ab_float32_z_flag( float32_le ); - break; - case FLOAT32_LT: - time_ab_float32_z_flag( float32_lt ); - break; - case FLOAT32_EQ_SIGNALING: - time_ab_float32_z_flag( float32_eq_signaling ); - break; - case FLOAT32_LE_QUIET: - time_ab_float32_z_flag( float32_le_quiet ); - break; - case FLOAT32_LT_QUIET: - time_ab_float32_z_flag( float32_lt_quiet ); - break; - case FLOAT64_TO_INT32: - time_a_float64_z_int32( float64_to_int32 ); - break; - case FLOAT64_TO_INT32_ROUND_TO_ZERO: - time_a_float64_z_int32( float64_to_int32_round_to_zero ); - break; - case FLOAT64_TO_INT64: - time_a_float64_z_int64( float64_to_int64 ); - break; - case FLOAT64_TO_INT64_ROUND_TO_ZERO: - time_a_float64_z_int64( float64_to_int64_round_to_zero ); - break; - case FLOAT64_TO_FLOAT32: - time_a_float64_z_float32( float64_to_float32 ); - break; -#ifdef FLOATX80 - case FLOAT64_TO_FLOATX80: - time_a_float64_z_floatx80( float64_to_floatx80 ); - break; -#endif -#ifdef FLOAT128 - case FLOAT64_TO_FLOAT128: - time_a_float64_z_float128( float64_to_float128 ); - break; -#endif - case FLOAT64_ROUND_TO_INT: - time_az_float64( float64_round_to_int ); - break; - case FLOAT64_ADD: - time_abz_float64( float64_add ); - break; - case FLOAT64_SUB: - time_abz_float64( float64_sub ); - break; - case FLOAT64_MUL: - time_abz_float64( float64_mul ); - break; - case FLOAT64_DIV: - time_abz_float64( float64_div ); - break; - case FLOAT64_REM: - time_abz_float64( float64_rem ); - break; - case FLOAT64_SQRT: - time_az_float64_pos( float64_sqrt ); - break; - case FLOAT64_EQ: - time_ab_float64_z_flag( float64_eq ); - break; - case FLOAT64_LE: - time_ab_float64_z_flag( float64_le ); - break; - case FLOAT64_LT: - time_ab_float64_z_flag( float64_lt ); - break; - case FLOAT64_EQ_SIGNALING: - time_ab_float64_z_flag( float64_eq_signaling ); - break; - case FLOAT64_LE_QUIET: - time_ab_float64_z_flag( float64_le_quiet ); - break; - case FLOAT64_LT_QUIET: - time_ab_float64_z_flag( float64_lt_quiet ); - break; -#ifdef FLOATX80 - case FLOATX80_TO_INT32: - time_a_floatx80_z_int32( floatx80_to_int32 ); - break; - case FLOATX80_TO_INT32_ROUND_TO_ZERO: - time_a_floatx80_z_int32( floatx80_to_int32_round_to_zero ); - break; - case FLOATX80_TO_INT64: - time_a_floatx80_z_int64( floatx80_to_int64 ); - break; - case FLOATX80_TO_INT64_ROUND_TO_ZERO: - time_a_floatx80_z_int64( floatx80_to_int64_round_to_zero ); - break; - case FLOATX80_TO_FLOAT32: - time_a_floatx80_z_float32( floatx80_to_float32 ); - break; - case FLOATX80_TO_FLOAT64: - time_a_floatx80_z_float64( floatx80_to_float64 ); - break; -#ifdef FLOAT128 - case FLOATX80_TO_FLOAT128: - time_a_floatx80_z_float128( floatx80_to_float128 ); - break; -#endif - case FLOATX80_ROUND_TO_INT: - time_az_floatx80( floatx80_round_to_int ); - break; - case FLOATX80_ADD: - time_abz_floatx80( floatx80_add ); - break; - case FLOATX80_SUB: - time_abz_floatx80( floatx80_sub ); - break; - case FLOATX80_MUL: - time_abz_floatx80( floatx80_mul ); - break; - case FLOATX80_DIV: - time_abz_floatx80( floatx80_div ); - break; - case FLOATX80_REM: - time_abz_floatx80( floatx80_rem ); - break; - case FLOATX80_SQRT: - time_az_floatx80_pos( floatx80_sqrt ); - break; - case FLOATX80_EQ: - time_ab_floatx80_z_flag( floatx80_eq ); - break; - case FLOATX80_LE: - time_ab_floatx80_z_flag( floatx80_le ); - break; - case FLOATX80_LT: - time_ab_floatx80_z_flag( floatx80_lt ); - break; - case FLOATX80_EQ_SIGNALING: - time_ab_floatx80_z_flag( floatx80_eq_signaling ); - break; - case FLOATX80_LE_QUIET: - time_ab_floatx80_z_flag( floatx80_le_quiet ); - break; - case FLOATX80_LT_QUIET: - time_ab_floatx80_z_flag( floatx80_lt_quiet ); - break; -#endif -#ifdef FLOAT128 - case FLOAT128_TO_INT32: - time_a_float128_z_int32( float128_to_int32 ); - break; - case FLOAT128_TO_INT32_ROUND_TO_ZERO: - time_a_float128_z_int32( float128_to_int32_round_to_zero ); - break; - case FLOAT128_TO_INT64: - time_a_float128_z_int64( float128_to_int64 ); - break; - case FLOAT128_TO_INT64_ROUND_TO_ZERO: - time_a_float128_z_int64( float128_to_int64_round_to_zero ); - break; - case FLOAT128_TO_FLOAT32: - time_a_float128_z_float32( float128_to_float32 ); - break; - case FLOAT128_TO_FLOAT64: - time_a_float128_z_float64( float128_to_float64 ); - break; -#ifdef FLOATX80 - case FLOAT128_TO_FLOATX80: - time_a_float128_z_floatx80( float128_to_floatx80 ); - break; -#endif - case FLOAT128_ROUND_TO_INT: - time_az_float128( float128_round_to_int ); - break; - case FLOAT128_ADD: - time_abz_float128( float128_add ); - break; - case FLOAT128_SUB: - time_abz_float128( float128_sub ); - break; - case FLOAT128_MUL: - time_abz_float128( float128_mul ); - break; - case FLOAT128_DIV: - time_abz_float128( float128_div ); - break; - case FLOAT128_REM: - time_abz_float128( float128_rem ); - break; - case FLOAT128_SQRT: - time_az_float128_pos( float128_sqrt ); - break; - case FLOAT128_EQ: - time_ab_float128_z_flag( float128_eq ); - break; - case FLOAT128_LE: - time_ab_float128_z_flag( float128_le ); - break; - case FLOAT128_LT: - time_ab_float128_z_flag( float128_lt ); - break; - case FLOAT128_EQ_SIGNALING: - time_ab_float128_z_flag( float128_eq_signaling ); - break; - case FLOAT128_LE_QUIET: - time_ab_float128_z_flag( float128_le_quiet ); - break; - case FLOAT128_LT_QUIET: - time_ab_float128_z_flag( float128_lt_quiet ); - break; -#endif - } - -} - -static void - timeFunction( - uint8 functionCode, - int8 roundingPrecisionIn, - int8 roundingModeIn, - int8 tininessModeIn - ) -{ - int8 roundingPrecision, roundingMode, tininessMode; - - roundingPrecision = 32; - for (;;) { - if ( ! functions[ functionCode ].roundingPrecision ) { - roundingPrecision = 0; - } - else if ( roundingPrecisionIn ) { - roundingPrecision = roundingPrecisionIn; - } - for ( roundingMode = 1; - roundingMode < NUM_ROUNDINGMODES; - ++roundingMode - ) { - if ( ! functions[ functionCode ].roundingMode ) { - roundingMode = 0; - } - else if ( roundingModeIn ) { - roundingMode = roundingModeIn; - } - for ( tininessMode = 1; - tininessMode < NUM_TININESSMODES; - ++tininessMode - ) { - if ( ( roundingPrecision == 32 ) - || ( roundingPrecision == 64 ) ) { - if ( ! functions[ functionCode ] - .tininessModeAtReducedPrecision - ) { - tininessMode = 0; - } - else if ( tininessModeIn ) { - tininessMode = tininessModeIn; - } - } - else { - if ( ! functions[ functionCode ].tininessMode ) { - tininessMode = 0; - } - else if ( tininessModeIn ) { - tininessMode = tininessModeIn; - } - } - timeFunctionVariety( - functionCode, roundingPrecision, roundingMode, tininessMode - ); - if ( tininessModeIn || ! tininessMode ) break; - } - if ( roundingModeIn || ! roundingMode ) break; - } - if ( roundingPrecisionIn || ! roundingPrecision ) break; - if ( roundingPrecision == 80 ) { - break; - } - else if ( roundingPrecision == 64 ) { - roundingPrecision = 80; - } - else if ( roundingPrecision == 32 ) { - roundingPrecision = 64; - } - } - -} - -main( int argc, char **argv ) -{ - char *argPtr; - flag functionArgument; - uint8 functionCode; - int8 operands, roundingPrecision, roundingMode, tininessMode; - - if ( argc <= 1 ) goto writeHelpMessage; - functionArgument = FALSE; - functionCode = 0; - operands = 0; - roundingPrecision = 0; - roundingMode = 0; - tininessMode = 0; - --argc; - ++argv; - while ( argc && ( argPtr = argv[ 0 ] ) ) { - if ( argPtr[ 0 ] == '-' ) ++argPtr; - if ( strcmp( argPtr, "help" ) == 0 ) { - writeHelpMessage: - fputs( -"timesoftfloat [