From 1af8be991f042ea7ab16ed54ecc241dbefdd0529 Mon Sep 17 00:00:00 2001 From: cvs2svn <> Date: Wed, 20 Feb 2008 16:28:10 +0000 Subject: This commit was manufactured by cvs2svn to create branch 'gdb_6_8-branch'. Sprout from master 2008-02-20 16:28:09 UTC Paolo Bonzini 'config:' Cherrypick from cygnus 1999-05-03 07:29:06 UTC Richard Henderson '19990502 sourceware import': README config/mh-armpic config/mh-elfalphapic config/mh-m68kpic config/mh-papic config/mh-ppcpic config/mh-x86pic config/mt-d30v config/mt-netware config/mt-ospace etc/add-log.el etc/add-log.vi etc/configbuild.ein etc/configbuild.fig etc/configbuild.jin etc/configbuild.tin etc/configdev.ein etc/configdev.fig etc/configdev.jin etc/configdev.tin include/aout/hppa.h include/coff/sym.h include/fopen-bin.h include/fopen-same.h include/fopen-vms.h include/opcode/tahoe.h makefile.vms Delete: libgloss/ChangeLog libgloss/Makefile.in libgloss/README libgloss/acinclude.m4 libgloss/aclocal.m4 libgloss/arm/Makefile.in libgloss/arm/_exit.c libgloss/arm/_kill.c libgloss/arm/aclocal.m4 libgloss/arm/coff-iq80310.specs libgloss/arm/coff-pid.specs libgloss/arm/coff-rdimon.specs libgloss/arm/coff-rdpmon.specs libgloss/arm/coff-redboot.ld libgloss/arm/coff-redboot.specs libgloss/arm/configure libgloss/arm/configure.in libgloss/arm/crt0.S libgloss/arm/elf-iq80310.specs libgloss/arm/elf-linux.specs libgloss/arm/elf-pid.specs libgloss/arm/elf-rdimon.specs libgloss/arm/elf-rdpmon.specs libgloss/arm/elf-redboot.ld libgloss/arm/elf-redboot.specs libgloss/arm/libcfunc.c libgloss/arm/linux-crt0.c libgloss/arm/linux-syscall.h libgloss/arm/linux-syscalls0.S libgloss/arm/linux-syscalls1.c libgloss/arm/redboot-crt0.S libgloss/arm/redboot-syscalls.c libgloss/arm/swi.h libgloss/arm/syscall.h libgloss/arm/syscalls.c libgloss/arm/trap.S libgloss/bfin/Makefile.in libgloss/bfin/aclocal.m4 libgloss/bfin/configure libgloss/bfin/configure.in libgloss/bfin/crt0.S libgloss/bfin/syscalls.c libgloss/close.c libgloss/config/default.mh libgloss/config/default.mt libgloss/config/dos.mh libgloss/config/mips.mt libgloss/config/mn10200.mt libgloss/config/mn10300.mt libgloss/config/ppc.mh libgloss/configure libgloss/configure.in libgloss/cris/Makefile.in libgloss/cris/aclocal.m4 libgloss/cris/configure libgloss/cris/configure.in libgloss/cris/crt0.S libgloss/cris/crti.c libgloss/cris/crtn.c libgloss/cris/gensyscalls libgloss/cris/irqtable.S libgloss/cris/lcrt0.c libgloss/cris/linunistd.h libgloss/cris/outbyte.c libgloss/cris/setup.S libgloss/crx/Makefile.in libgloss/crx/_exit.c libgloss/crx/_getenv.c libgloss/crx/_rename.c libgloss/crx/aclocal.m4 libgloss/crx/close.c libgloss/crx/configure libgloss/crx/configure.in libgloss/crx/crt0.S libgloss/crx/crti.S libgloss/crx/crtn.S libgloss/crx/dvz_hndl.c libgloss/crx/flg_hndl.c libgloss/crx/fstat.c libgloss/crx/getpid.c libgloss/crx/iad_hndl.c libgloss/crx/intable.c libgloss/crx/isatty.c libgloss/crx/kill.c libgloss/crx/lseek.c libgloss/crx/open.c libgloss/crx/putnum.c libgloss/crx/read.c libgloss/crx/sbrk.c libgloss/crx/sim.ld libgloss/crx/stat.c libgloss/crx/svc_hndl.c libgloss/crx/time.c libgloss/crx/und_hndl.c libgloss/crx/unlink.c libgloss/crx/write.c libgloss/d30v/Makefile.in libgloss/d30v/aclocal.m4 libgloss/d30v/configure libgloss/d30v/configure.in libgloss/d30v/crt0.S libgloss/d30v/inbyte.c libgloss/d30v/outbyte.c libgloss/d30v/syscalls.c libgloss/debug.c libgloss/debug.h libgloss/doc/Makefile.in libgloss/doc/configure libgloss/doc/configure.in libgloss/doc/porting.texi libgloss/fr30/Makefile.in libgloss/fr30/aclocal.m4 libgloss/fr30/configure libgloss/fr30/configure.in libgloss/fr30/crt0.s libgloss/fr30/syscalls.c libgloss/frv/Makefile.in libgloss/frv/aclocal.m4 libgloss/frv/configure libgloss/frv/configure.in libgloss/frv/crt0.S libgloss/frv/fstat.c libgloss/frv/getpid.c libgloss/frv/isatty.c libgloss/frv/kill.c libgloss/frv/print.c libgloss/frv/putnum.c libgloss/frv/sbrk.c libgloss/frv/sim-close.S libgloss/frv/sim-exit.S libgloss/frv/sim-inbyte.c libgloss/frv/sim-lseek.S libgloss/frv/sim-open.S libgloss/frv/sim-read.S libgloss/frv/sim-time.c libgloss/frv/sim-unlink.S libgloss/frv/sim-write.S libgloss/frv/stat.c libgloss/fstat.c libgloss/getpid.c libgloss/glue.h libgloss/hp74x/Makefile.in libgloss/hp74x/README libgloss/hp74x/aclocal.m4 libgloss/hp74x/checksum.c libgloss/hp74x/configure libgloss/hp74x/configure.in libgloss/hp74x/crt0.s libgloss/hp74x/debugger.h libgloss/hp74x/debugger.s libgloss/hp74x/diagnose.h libgloss/hp74x/hppa-defs.h libgloss/hp74x/hppa.ld libgloss/hp74x/io.c libgloss/hp74x/iva_table.h libgloss/hp74x/iva_table.s libgloss/hp74x/pa_stub.c libgloss/hp74x/test.c libgloss/i386/Makefile.in libgloss/i386/aclocal.m4 libgloss/i386/configure libgloss/i386/configure.in libgloss/i386/cygmon-crt0.S libgloss/i386/cygmon-gmon.c libgloss/i386/cygmon-gmon.h libgloss/i386/cygmon-salib.c libgloss/i386/cygmon-syscall.h libgloss/i386/cygmon.ld libgloss/i960/Makefile.in libgloss/i960/aclocal.m4 libgloss/i960/asm.h libgloss/i960/configure libgloss/i960/configure.in libgloss/i960/crt0.c libgloss/i960/mon-read.c libgloss/i960/mon-syscalls.S libgloss/i960/mon-write.c libgloss/i960/mon960.c libgloss/i960/mon960.ld libgloss/i960/syscall.h libgloss/iq2000/Makefile.in libgloss/iq2000/_exit.c libgloss/iq2000/access.c libgloss/iq2000/aclocal.m4 libgloss/iq2000/chmod.c libgloss/iq2000/chown.c libgloss/iq2000/close.c libgloss/iq2000/configure libgloss/iq2000/configure.in libgloss/iq2000/creat.c libgloss/iq2000/crt0.S libgloss/iq2000/crt1.c libgloss/iq2000/execv.c libgloss/iq2000/execve.c libgloss/iq2000/fork.c libgloss/iq2000/fstat.c libgloss/iq2000/getpid.c libgloss/iq2000/gettime.c libgloss/iq2000/isatty.c libgloss/iq2000/kill.c libgloss/iq2000/lseek.c libgloss/iq2000/open.c libgloss/iq2000/pipe.c libgloss/iq2000/read.c libgloss/iq2000/sbrk.c libgloss/iq2000/sim.ld libgloss/iq2000/stat.c libgloss/iq2000/test.c libgloss/iq2000/time.c libgloss/iq2000/times.c libgloss/iq2000/trap.c libgloss/iq2000/trap.h libgloss/iq2000/unlink.c libgloss/iq2000/utime.c libgloss/iq2000/wait.c libgloss/iq2000/write.c libgloss/isatty.c libgloss/kill.c libgloss/libnosys/Makefile.in libgloss/libnosys/_exit.c libgloss/libnosys/acconfig.h libgloss/libnosys/aclocal.m4 libgloss/libnosys/chown.c libgloss/libnosys/close.c libgloss/libnosys/config.h.in libgloss/libnosys/configure libgloss/libnosys/configure.in libgloss/libnosys/environ.c libgloss/libnosys/errno.c libgloss/libnosys/execve.c libgloss/libnosys/fork.c libgloss/libnosys/fstat.c libgloss/libnosys/getpid.c libgloss/libnosys/gettod.c libgloss/libnosys/isatty.c libgloss/libnosys/kill.c libgloss/libnosys/link.c libgloss/libnosys/lseek.c libgloss/libnosys/open.c libgloss/libnosys/read.c libgloss/libnosys/readlink.c libgloss/libnosys/sbrk.c libgloss/libnosys/stat.c libgloss/libnosys/symlink.c libgloss/libnosys/times.c libgloss/libnosys/unlink.c libgloss/libnosys/wait.c libgloss/libnosys/warning.h libgloss/libnosys/write.c libgloss/lseek.c libgloss/m32c/Makefile.in libgloss/m32c/abort.S libgloss/m32c/aclocal.m4 libgloss/m32c/argv.S libgloss/m32c/argvlen.S libgloss/m32c/chdir.S libgloss/m32c/chmod.S libgloss/m32c/close.S libgloss/m32c/configure libgloss/m32c/configure.in libgloss/m32c/crt0.S libgloss/m32c/crtn.S libgloss/m32c/exit.S libgloss/m32c/fstat.S libgloss/m32c/genscript libgloss/m32c/getpid.S libgloss/m32c/gettimeofday.S libgloss/m32c/heaptop.S libgloss/m32c/isatty.S libgloss/m32c/kill.S libgloss/m32c/link.S libgloss/m32c/lseek.S libgloss/m32c/m32c.tmpl libgloss/m32c/m32csys.h libgloss/m32c/open.S libgloss/m32c/read.S libgloss/m32c/sbrk.c libgloss/m32c/stat.S libgloss/m32c/time.S libgloss/m32c/times.S libgloss/m32c/unlink.S libgloss/m32c/utime.S libgloss/m32c/write.S libgloss/m32r/Makefile.in libgloss/m32r/aclocal.m4 libgloss/m32r/chmod.c libgloss/m32r/close.c libgloss/m32r/configure libgloss/m32r/configure.in libgloss/m32r/crt0.S libgloss/m32r/eit.h libgloss/m32r/eva-stub.ld libgloss/m32r/eva.ld libgloss/m32r/exit.c libgloss/m32r/fstat.c libgloss/m32r/getpid.c libgloss/m32r/isatty.c libgloss/m32r/kill.c libgloss/m32r/lseek.c libgloss/m32r/m32r-lib.c libgloss/m32r/mon.specs libgloss/m32r/open.c libgloss/m32r/raise.c libgloss/m32r/read.c libgloss/m32r/sbrk.c libgloss/m32r/stat.c libgloss/m32r/trap0.S libgloss/m32r/trapmon0.c libgloss/m32r/unlink.c libgloss/m32r/utime.c libgloss/m32r/write.c libgloss/m68hc11/Makefile.in libgloss/m68hc11/aclocal.m4 libgloss/m68hc11/configure libgloss/m68hc11/configure.in libgloss/m68hc11/crt0.S libgloss/m68hc11/sci-inout.S libgloss/m68hc11/sim-valid-m68hc11.ld libgloss/m68hc11/sim-valid-m68hc12.ld libgloss/m68hc11/syscalls.c libgloss/m68k/Makefile.in libgloss/m68k/README libgloss/m68k/aclocal.m4 libgloss/m68k/asm.h libgloss/m68k/bcc.ld libgloss/m68k/cf-crt0.S libgloss/m68k/cf-crt1.c libgloss/m68k/cf-exit.c libgloss/m68k/cf-hosted.S libgloss/m68k/cf-isrs.c libgloss/m68k/cf-isv.S libgloss/m68k/cf-sbrk.c libgloss/m68k/cf.sc libgloss/m68k/configure libgloss/m68k/configure.in libgloss/m68k/cpu32bug.S libgloss/m68k/cpu32bug.h libgloss/m68k/crt0.S libgloss/m68k/dtor.C libgloss/m68k/fido-_exit.c libgloss/m68k/fido-crt0.S libgloss/m68k/fido-handler.c libgloss/m68k/fido-hosted.S libgloss/m68k/fido-sbrk.c libgloss/m68k/fido.h libgloss/m68k/fido.sc libgloss/m68k/fido_profiling.h libgloss/m68k/idp-inbyte.c libgloss/m68k/idp-outbyte.c libgloss/m68k/idp.ld libgloss/m68k/idpgdb.ld libgloss/m68k/io-close.c libgloss/m68k/io-exit.c libgloss/m68k/io-fstat.c libgloss/m68k/io-gdb.c libgloss/m68k/io-gettimeofday.c libgloss/m68k/io-isatty.c libgloss/m68k/io-lseek.c libgloss/m68k/io-open.c libgloss/m68k/io-read.c libgloss/m68k/io-rename.c libgloss/m68k/io-stat.c libgloss/m68k/io-system.c libgloss/m68k/io-time.c libgloss/m68k/io-unlink.c libgloss/m68k/io-write.c libgloss/m68k/io.h libgloss/m68k/leds.c libgloss/m68k/leds.h libgloss/m68k/mc68681reg.h libgloss/m68k/mc68ec.c libgloss/m68k/mvme-stub.c libgloss/m68k/mvme.S libgloss/m68k/mvme135-asm.S libgloss/m68k/mvme135.ld libgloss/m68k/mvme162.ld libgloss/m68k/mvme162lx-asm.S libgloss/m68k/sbc5204.ld libgloss/m68k/sbc5206.ld libgloss/m68k/sim-abort.c libgloss/m68k/sim-crt0.S libgloss/m68k/sim-errno.c libgloss/m68k/sim-funcs.c libgloss/m68k/sim-inbyte.c libgloss/m68k/sim-print.c libgloss/m68k/sim-sbrk.c libgloss/m68k/sim.ld libgloss/m68k/simulator.S libgloss/m68k/test.c libgloss/mcore/Makefile.in libgloss/mcore/aclocal.m4 libgloss/mcore/close.c libgloss/mcore/cmb-exit.c libgloss/mcore/cmb-inbyte.c libgloss/mcore/cmb-outbyte.c libgloss/mcore/configure libgloss/mcore/configure.in libgloss/mcore/crt0.S libgloss/mcore/elf-cmb.ld libgloss/mcore/elf-cmb.specs libgloss/mcore/fstat.c libgloss/mcore/getpid.c libgloss/mcore/kill.c libgloss/mcore/lseek.c libgloss/mcore/open.c libgloss/mcore/pe-cmb.ld libgloss/mcore/pe-cmb.specs libgloss/mcore/print.c libgloss/mcore/putnum.c libgloss/mcore/raise.c libgloss/mcore/read.c libgloss/mcore/sbrk.c libgloss/mcore/stat.c libgloss/mcore/syscalls.S libgloss/mcore/unlink.c libgloss/mcore/write.c libgloss/mep/Makefile.in libgloss/mep/aclocal.m4 libgloss/mep/configure libgloss/mep/configure.in libgloss/mep/crt0.S libgloss/mep/crtn.S libgloss/mep/fmax.ld libgloss/mep/gcov-io.h libgloss/mep/gmap_default.ld libgloss/mep/h_reset.c libgloss/mep/handlers.c libgloss/mep/isatty.c libgloss/mep/mep-bb.c libgloss/mep/mep-gmon.c libgloss/mep/min.ld libgloss/mep/read.c libgloss/mep/sbrk.c libgloss/mep/sdram-crt0.S libgloss/mep/sim-crt0.S libgloss/mep/sim-crtn.S libgloss/mep/simnovec-crt0.S libgloss/mep/simple.ld libgloss/mep/simsdram-crt0.S libgloss/mep/syscalls.S libgloss/mep/write.c libgloss/mips/Makefile.in libgloss/mips/aclocal.m4 libgloss/mips/array-io.c libgloss/mips/array.ld libgloss/mips/cfe.c libgloss/mips/cfe.ld libgloss/mips/cfe_api.c libgloss/mips/cfe_api.h libgloss/mips/cfe_api_int.h libgloss/mips/cfe_error.h libgloss/mips/cfe_mem.c libgloss/mips/cma101.c libgloss/mips/configure libgloss/mips/configure.in libgloss/mips/crt0.S libgloss/mips/crt0_cfe.S libgloss/mips/crt0_cygmon.S libgloss/mips/cygmon.c libgloss/mips/ddb-kseg0.ld libgloss/mips/ddb.ld libgloss/mips/dtor.C libgloss/mips/dve.ld libgloss/mips/dvemon.c libgloss/mips/entry.S libgloss/mips/idt.ld libgloss/mips/idt32.ld libgloss/mips/idt64.ld libgloss/mips/idtecoff.ld libgloss/mips/idtmon.S libgloss/mips/jmr3904-io.c libgloss/mips/jmr3904app-java.ld libgloss/mips/jmr3904app.ld libgloss/mips/jmr3904dram-java.ld libgloss/mips/jmr3904dram.ld libgloss/mips/lsi.ld libgloss/mips/lsipmon.S libgloss/mips/nullmon.c libgloss/mips/nullmon.ld libgloss/mips/pmon.S libgloss/mips/pmon.ld libgloss/mips/regs.S libgloss/mips/syscalls.c libgloss/mips/test.c libgloss/mips/vr4300.S libgloss/mips/vr5xxx.S libgloss/mn10200/Makefile.in libgloss/mn10200/_exit.c libgloss/mn10200/access.c libgloss/mn10200/aclocal.m4 libgloss/mn10200/chmod.c libgloss/mn10200/chown.c libgloss/mn10200/close.c libgloss/mn10200/configure libgloss/mn10200/configure.in libgloss/mn10200/creat.c libgloss/mn10200/crt0.S libgloss/mn10200/crt1.c libgloss/mn10200/eval.ld libgloss/mn10200/execv.c libgloss/mn10200/execve.c libgloss/mn10200/fork.c libgloss/mn10200/fstat.c libgloss/mn10200/getpid.c libgloss/mn10200/gettime.c libgloss/mn10200/isatty.c libgloss/mn10200/kill.c libgloss/mn10200/lseek.c libgloss/mn10200/open.c libgloss/mn10200/pipe.c libgloss/mn10200/read.c libgloss/mn10200/sbrk.c libgloss/mn10200/sim.ld libgloss/mn10200/stat.c libgloss/mn10200/test.c libgloss/mn10200/time.c libgloss/mn10200/times.c libgloss/mn10200/trap.S libgloss/mn10200/trap.h libgloss/mn10200/unlink.c libgloss/mn10200/utime.c libgloss/mn10200/wait.c libgloss/mn10200/write.c libgloss/mn10300/Makefile.in libgloss/mn10300/_exit.c libgloss/mn10300/access.c libgloss/mn10300/aclocal.m4 libgloss/mn10300/asb2303.ld libgloss/mn10300/asb2305.ld libgloss/mn10300/chmod.c libgloss/mn10300/chown.c libgloss/mn10300/close.c libgloss/mn10300/configure libgloss/mn10300/configure.in libgloss/mn10300/creat.c libgloss/mn10300/crt0-eval.S libgloss/mn10300/crt0.S libgloss/mn10300/crt0_cygmon.S libgloss/mn10300/crt0_redboot.S libgloss/mn10300/crt1.c libgloss/mn10300/cygmon.c libgloss/mn10300/eval.ld libgloss/mn10300/execv.c libgloss/mn10300/execve.c libgloss/mn10300/fork.c libgloss/mn10300/fstat.c libgloss/mn10300/getpid.c libgloss/mn10300/gettime.c libgloss/mn10300/isatty.c libgloss/mn10300/kill.c libgloss/mn10300/lseek.c libgloss/mn10300/open.c libgloss/mn10300/pipe.c libgloss/mn10300/read.c libgloss/mn10300/sbrk.c libgloss/mn10300/sim.ld libgloss/mn10300/stat.c libgloss/mn10300/test.c libgloss/mn10300/time.c libgloss/mn10300/times.c libgloss/mn10300/trap.S libgloss/mn10300/trap.h libgloss/mn10300/unlink.c libgloss/mn10300/utime.c libgloss/mn10300/wait.c libgloss/mn10300/write.c libgloss/mt/16-002.ld libgloss/mt/16-003.ld libgloss/mt/64-001.ld libgloss/mt/Makefile.in libgloss/mt/access.c libgloss/mt/aclocal.m4 libgloss/mt/chmod.c libgloss/mt/close.c libgloss/mt/configure libgloss/mt/configure.in libgloss/mt/crt0-16-002.S libgloss/mt/crt0-16-003.S libgloss/mt/crt0-64-001.S libgloss/mt/crt0-ms2.S libgloss/mt/crt0.S libgloss/mt/exit-16-002.c libgloss/mt/exit-16-003.c libgloss/mt/exit-64-001.c libgloss/mt/exit-ms2.c libgloss/mt/exit.c libgloss/mt/fstat.c libgloss/mt/getpid.c libgloss/mt/gettime.c libgloss/mt/isatty.c libgloss/mt/kill.c libgloss/mt/lseek.c libgloss/mt/ms2.ld libgloss/mt/open.c libgloss/mt/read.c libgloss/mt/sbrk.c libgloss/mt/startup-16-002.S libgloss/mt/startup-16-003.S libgloss/mt/startup-64-001.S libgloss/mt/startup-ms2.S libgloss/mt/stat.c libgloss/mt/time.c libgloss/mt/times.c libgloss/mt/trap.S libgloss/mt/trap.h libgloss/mt/unlink.c libgloss/mt/utime.c libgloss/mt/write.c libgloss/open.c libgloss/pa/Makefile.in libgloss/pa/README libgloss/pa/aclocal.m4 libgloss/pa/configure libgloss/pa/configure.in libgloss/pa/crt0.S libgloss/pa/hp-milli.s libgloss/pa/op50n-io.S libgloss/pa/op50n.h libgloss/pa/op50n.ld libgloss/pa/op50nled.c libgloss/pa/setjmp.S libgloss/pa/test.c libgloss/pa/w89k-io.c libgloss/pa/w89k.h libgloss/pa/w89k.ld libgloss/print.c libgloss/putnum.c libgloss/read.c libgloss/rs6000/Makefile.in libgloss/rs6000/aclocal.m4 libgloss/rs6000/ads-exit.S libgloss/rs6000/ads-io.c libgloss/rs6000/ads.ld libgloss/rs6000/configure libgloss/rs6000/configure.in libgloss/rs6000/crt0.S libgloss/rs6000/mbx-exit.c libgloss/rs6000/mbx-inbyte.c libgloss/rs6000/mbx-outbyte.c libgloss/rs6000/mbx-print.c libgloss/rs6000/mbx.ld libgloss/rs6000/mbx.specs libgloss/rs6000/mcount.S libgloss/rs6000/mvme-errno.c libgloss/rs6000/mvme-exit.S libgloss/rs6000/mvme-inbyte.S libgloss/rs6000/mvme-outbyte.S libgloss/rs6000/mvme-print.c libgloss/rs6000/mvme-read.c libgloss/rs6000/sim-abort.c libgloss/rs6000/sim-crt0.S libgloss/rs6000/sim-errno.c libgloss/rs6000/sim-getrusage.S libgloss/rs6000/sim-inbyte.c libgloss/rs6000/sim-print.c libgloss/rs6000/sim-sbrk.c libgloss/rs6000/simulator.S libgloss/rs6000/sol-cfuncs.c libgloss/rs6000/sol-syscall.S libgloss/rs6000/test.c libgloss/rs6000/yellowknife.ld libgloss/sbrk.c libgloss/sh/sh1lcevb.ld libgloss/sh/sh2lcevb.ld libgloss/sh/sh3bb.ld libgloss/sh/sh3lcevb.ld libgloss/sparc/Makefile.in libgloss/sparc/aclocal.m4 libgloss/sparc/asm.h libgloss/sparc/cache.c libgloss/sparc/configure libgloss/sparc/configure.in libgloss/sparc/crt0-701.S libgloss/sparc/crt0.S libgloss/sparc/cygmon-crt0.S libgloss/sparc/cygmon-salib.c libgloss/sparc/cygmon-sparc64-ld.src libgloss/sparc/cygmon.ld.src libgloss/sparc/dtor.C libgloss/sparc/elfsim.ld libgloss/sparc/erc32-crt0.S libgloss/sparc/erc32-io.c libgloss/sparc/erc32-stub.c libgloss/sparc/erc32.ld libgloss/sparc/ex930.ld libgloss/sparc/ex931.ld libgloss/sparc/ex934.ld libgloss/sparc/fixctors.c libgloss/sparc/libsys/Makefile.in libgloss/sparc/libsys/_exit.S libgloss/sparc/libsys/aclocal.m4 libgloss/sparc/libsys/cerror.S libgloss/sparc/libsys/configure libgloss/sparc/libsys/configure.in libgloss/sparc/libsys/isatty.c libgloss/sparc/libsys/libsys-crt0.S libgloss/sparc/libsys/sbrk.S libgloss/sparc/libsys/syscall.h libgloss/sparc/libsys/syscallasm.h libgloss/sparc/libsys/template.S libgloss/sparc/libsys/template_r.S libgloss/sparc/salib-701.c libgloss/sparc/salib.c libgloss/sparc/slite.h libgloss/sparc/sparc-stub.c libgloss/sparc/sparc86x.ld libgloss/sparc/sparcl-stub.c libgloss/sparc/sparclet-stub.c libgloss/sparc/sparclite.h libgloss/sparc/sysc-701.c libgloss/sparc/syscalls.c libgloss/sparc/test.c libgloss/sparc/traps.S libgloss/sparc/tsc701.ld libgloss/spu/Makefile.in libgloss/spu/access.c libgloss/spu/aclocal.m4 libgloss/spu/chdir.c libgloss/spu/chmod.c libgloss/spu/chown.c libgloss/spu/close.c libgloss/spu/configure libgloss/spu/configure.in libgloss/spu/conv_stat.c libgloss/spu/crt0.S libgloss/spu/crti.S libgloss/spu/crtn.S libgloss/spu/dirfuncs.c libgloss/spu/dup.c libgloss/spu/dup2.c libgloss/spu/exit.c libgloss/spu/fchdir.c libgloss/spu/fchmod.c libgloss/spu/fchown.c libgloss/spu/fdatasync.c libgloss/spu/fstat.c libgloss/spu/fsync.c libgloss/spu/ftruncate.c libgloss/spu/getcwd.c libgloss/spu/getpagesize.c libgloss/spu/getpid.c libgloss/spu/gettimeofday.c libgloss/spu/isatty.c libgloss/spu/jsre.h libgloss/spu/kill.c libgloss/spu/lchown.c libgloss/spu/link.c libgloss/spu/lockf.c libgloss/spu/lseek.c libgloss/spu/lstat.c libgloss/spu/mkdir.c libgloss/spu/mknod.c libgloss/spu/mkstemp.c libgloss/spu/mktemp.c libgloss/spu/nanosleep.c libgloss/spu/open.c libgloss/spu/pread.c libgloss/spu/pwrite.c libgloss/spu/read.c libgloss/spu/readlink.c libgloss/spu/readv.c libgloss/spu/rmdir.c libgloss/spu/sbrk.c libgloss/spu/sched_yield.c libgloss/spu/shm_open.c libgloss/spu/shm_unlink.c libgloss/spu/stat.c libgloss/spu/symlink.c libgloss/spu/sync.c libgloss/spu/syscalls.c libgloss/spu/truncate.c libgloss/spu/umask.c libgloss/spu/unlink.c libgloss/spu/utime.c libgloss/spu/utimes.c libgloss/spu/write.c libgloss/spu/writev.c libgloss/stat.c libgloss/syscall.h libgloss/testsuite/Makefile.in libgloss/testsuite/config/hppa.mt libgloss/testsuite/config/m68k.mt libgloss/testsuite/config/mips.mt libgloss/testsuite/config/support.c libgloss/testsuite/configure.in libgloss/testsuite/lib/libgloss.exp libgloss/testsuite/libgloss.all/.gdbinit libgloss/testsuite/libgloss.all/Makefile.in libgloss/testsuite/libgloss.all/array.c libgloss/testsuite/libgloss.all/configure.in libgloss/testsuite/libgloss.all/div.c libgloss/testsuite/libgloss.all/double.c libgloss/testsuite/libgloss.all/float.c libgloss/testsuite/libgloss.all/func.c libgloss/testsuite/libgloss.all/io.c libgloss/testsuite/libgloss.all/math.c libgloss/testsuite/libgloss.all/memory.c libgloss/testsuite/libgloss.all/misc.c libgloss/testsuite/libgloss.all/printf.c libgloss/testsuite/libgloss.all/struct.c libgloss/testsuite/libgloss.all/varargs.c libgloss/testsuite/libgloss.all/varargs2.c libgloss/unlink.c libgloss/v850/sys/syscall.h libgloss/wince/Makefile.am libgloss/wince/Makefile.in libgloss/wince/aclocal.m4 libgloss/wince/configure libgloss/wince/configure.in libgloss/write.c libgloss/xstormy16/Makefile.in libgloss/xstormy16/aclocal.m4 libgloss/xstormy16/close.c libgloss/xstormy16/configure libgloss/xstormy16/configure.in libgloss/xstormy16/crt0.s libgloss/xstormy16/crt0_stub.s libgloss/xstormy16/crti.s libgloss/xstormy16/crtn.s libgloss/xstormy16/eva_app.c libgloss/xstormy16/eva_app.ld libgloss/xstormy16/eva_stub.ld libgloss/xstormy16/fstat.c libgloss/xstormy16/getpid.c libgloss/xstormy16/isatty.c libgloss/xstormy16/kill.c libgloss/xstormy16/lseek.c libgloss/xstormy16/open.c libgloss/xstormy16/sim_high.ld libgloss/xstormy16/sim_malloc_start.s libgloss/xstormy16/sim_rom.ld libgloss/xstormy16/stat.c libgloss/xstormy16/syscalls.S libgloss/xstormy16/syscalls.m4 libgloss/xstormy16/unlink.c libgloss/xstormy16/xstormy16_stub.c newlib/ChangeLog newlib/MAINTAINERS newlib/Makefile.am newlib/Makefile.in newlib/Makefile.shared newlib/NEWS newlib/README newlib/acconfig.h newlib/acinclude.m4 newlib/aclocal.m4 newlib/configure newlib/configure.host newlib/configure.in newlib/confsubdir.m4 newlib/doc/Makefile.am newlib/doc/Makefile.in newlib/doc/aclocal.m4 newlib/doc/ansidecl.h newlib/doc/configure newlib/doc/configure.in newlib/doc/doc.str newlib/doc/makedoc.c newlib/iconvdata/EUC-JP.irreversible newlib/iconvdata/Makefile.am newlib/iconvdata/Makefile.in newlib/iconvdata/SJIS.irreversible newlib/iconvdata/aclocal.m4 newlib/iconvdata/configure newlib/iconvdata/configure.in newlib/iconvdata/dummy.c newlib/iconvdata/euc-jp.c newlib/iconvdata/gconv-modules newlib/iconvdata/jis0201.c newlib/iconvdata/jis0201.h newlib/iconvdata/jis0208.c newlib/iconvdata/jis0208.h newlib/iconvdata/jis0212.c newlib/iconvdata/jis0212.h newlib/iconvdata/sjis.c newlib/libc/Makefile.am newlib/libc/Makefile.in newlib/libc/aclocal.m4 newlib/libc/argz/Makefile.am newlib/libc/argz/Makefile.in newlib/libc/argz/argz_add.c newlib/libc/argz/argz_add_sep.c newlib/libc/argz/argz_append.c newlib/libc/argz/argz_count.c newlib/libc/argz/argz_create.c newlib/libc/argz/argz_create_sep.c newlib/libc/argz/argz_delete.c newlib/libc/argz/argz_extract.c newlib/libc/argz/argz_insert.c newlib/libc/argz/argz_next.c newlib/libc/argz/argz_replace.c newlib/libc/argz/argz_stringify.c newlib/libc/argz/buf_findstr.c newlib/libc/argz/buf_findstr.h newlib/libc/argz/dummy.c newlib/libc/argz/envz_add.c newlib/libc/argz/envz_entry.c newlib/libc/argz/envz_get.c newlib/libc/argz/envz_merge.c newlib/libc/argz/envz_remove.c newlib/libc/argz/envz_strip.c newlib/libc/configure newlib/libc/configure.in newlib/libc/ctype/Makefile.am newlib/libc/ctype/Makefile.in newlib/libc/ctype/_tolower.c newlib/libc/ctype/_toupper.c newlib/libc/ctype/ctype.tex newlib/libc/ctype/ctype_.c newlib/libc/ctype/isalnum.c newlib/libc/ctype/isalpha.c newlib/libc/ctype/isascii.c newlib/libc/ctype/isblank.c newlib/libc/ctype/iscntrl.c newlib/libc/ctype/isdigit.c newlib/libc/ctype/islower.c newlib/libc/ctype/isprint.c newlib/libc/ctype/ispunct.c newlib/libc/ctype/isspace.c newlib/libc/ctype/isupper.c newlib/libc/ctype/iswalnum.c newlib/libc/ctype/iswalpha.c newlib/libc/ctype/iswblank.c newlib/libc/ctype/iswcntrl.c newlib/libc/ctype/iswctype.c newlib/libc/ctype/iswdigit.c newlib/libc/ctype/iswgraph.c newlib/libc/ctype/iswlower.c newlib/libc/ctype/iswprint.c newlib/libc/ctype/iswpunct.c newlib/libc/ctype/iswspace.c newlib/libc/ctype/iswupper.c newlib/libc/ctype/iswxdigit.c newlib/libc/ctype/isxdigit.c newlib/libc/ctype/jp2uc.c newlib/libc/ctype/jp2uc.h newlib/libc/ctype/local.h newlib/libc/ctype/toascii.c newlib/libc/ctype/tolower.c newlib/libc/ctype/toupper.c newlib/libc/ctype/towctrans.c newlib/libc/ctype/towlower.c newlib/libc/ctype/towupper.c newlib/libc/ctype/utf8alpha.h newlib/libc/ctype/utf8print.h newlib/libc/ctype/utf8punct.h newlib/libc/ctype/wctrans.c newlib/libc/ctype/wctype.c newlib/libc/errno/Makefile.am newlib/libc/errno/Makefile.in newlib/libc/errno/errno.c newlib/libc/iconv/Makefile.am newlib/libc/iconv/Makefile.in newlib/libc/iconv/ccs/Makefile.am newlib/libc/iconv/ccs/Makefile.in newlib/libc/iconv/ccs/big5.c newlib/libc/iconv/ccs/binary/Makefile.am newlib/libc/iconv/ccs/binary/Makefile.in newlib/libc/iconv/ccs/binary/big5.cct newlib/libc/iconv/ccs/binary/cns11643_plane1.cct newlib/libc/iconv/ccs/binary/cns11643_plane14.cct newlib/libc/iconv/ccs/binary/cns11643_plane2.cct newlib/libc/iconv/ccs/binary/cp775.cct newlib/libc/iconv/ccs/binary/cp850.cct newlib/libc/iconv/ccs/binary/cp852.cct newlib/libc/iconv/ccs/binary/cp855.cct newlib/libc/iconv/ccs/binary/cp866.cct newlib/libc/iconv/ccs/binary/iso_8859_1.cct newlib/libc/iconv/ccs/binary/iso_8859_10.cct newlib/libc/iconv/ccs/binary/iso_8859_11.cct newlib/libc/iconv/ccs/binary/iso_8859_13.cct newlib/libc/iconv/ccs/binary/iso_8859_14.cct newlib/libc/iconv/ccs/binary/iso_8859_15.cct newlib/libc/iconv/ccs/binary/iso_8859_2.cct newlib/libc/iconv/ccs/binary/iso_8859_3.cct newlib/libc/iconv/ccs/binary/iso_8859_4.cct newlib/libc/iconv/ccs/binary/iso_8859_5.cct newlib/libc/iconv/ccs/binary/iso_8859_6.cct newlib/libc/iconv/ccs/binary/iso_8859_7.cct newlib/libc/iconv/ccs/binary/iso_8859_8.cct newlib/libc/iconv/ccs/binary/iso_8859_9.cct newlib/libc/iconv/ccs/binary/iso_ir_111.cct newlib/libc/iconv/ccs/binary/jis_x0201_1976.cct newlib/libc/iconv/ccs/binary/jis_x0208_1990.cct newlib/libc/iconv/ccs/binary/jis_x0212_1990.cct newlib/libc/iconv/ccs/binary/koi8_r.cct newlib/libc/iconv/ccs/binary/koi8_ru.cct newlib/libc/iconv/ccs/binary/koi8_u.cct newlib/libc/iconv/ccs/binary/koi8_uni.cct newlib/libc/iconv/ccs/binary/ksx1001.cct newlib/libc/iconv/ccs/binary/win_1250.cct newlib/libc/iconv/ccs/binary/win_1251.cct newlib/libc/iconv/ccs/binary/win_1252.cct newlib/libc/iconv/ccs/binary/win_1253.cct newlib/libc/iconv/ccs/binary/win_1254.cct newlib/libc/iconv/ccs/binary/win_1255.cct newlib/libc/iconv/ccs/binary/win_1256.cct newlib/libc/iconv/ccs/binary/win_1257.cct newlib/libc/iconv/ccs/binary/win_1258.cct newlib/libc/iconv/ccs/ccs.h newlib/libc/iconv/ccs/ccsbi.c newlib/libc/iconv/ccs/ccsbi.h newlib/libc/iconv/ccs/ccsnames.h newlib/libc/iconv/ccs/cns11643_plane1.c newlib/libc/iconv/ccs/cns11643_plane14.c newlib/libc/iconv/ccs/cns11643_plane2.c newlib/libc/iconv/ccs/cp775.c newlib/libc/iconv/ccs/cp850.c newlib/libc/iconv/ccs/cp852.c newlib/libc/iconv/ccs/cp855.c newlib/libc/iconv/ccs/cp866.c newlib/libc/iconv/ccs/iso_8859_1.c newlib/libc/iconv/ccs/iso_8859_10.c newlib/libc/iconv/ccs/iso_8859_11.c newlib/libc/iconv/ccs/iso_8859_13.c newlib/libc/iconv/ccs/iso_8859_14.c newlib/libc/iconv/ccs/iso_8859_15.c newlib/libc/iconv/ccs/iso_8859_2.c newlib/libc/iconv/ccs/iso_8859_3.c newlib/libc/iconv/ccs/iso_8859_4.c newlib/libc/iconv/ccs/iso_8859_5.c newlib/libc/iconv/ccs/iso_8859_6.c newlib/libc/iconv/ccs/iso_8859_7.c newlib/libc/iconv/ccs/iso_8859_8.c newlib/libc/iconv/ccs/iso_8859_9.c newlib/libc/iconv/ccs/iso_ir_111.c newlib/libc/iconv/ccs/jis_x0201_1976.c newlib/libc/iconv/ccs/jis_x0208_1990.c newlib/libc/iconv/ccs/jis_x0212_1990.c newlib/libc/iconv/ccs/koi8_r.c newlib/libc/iconv/ccs/koi8_ru.c newlib/libc/iconv/ccs/koi8_u.c newlib/libc/iconv/ccs/koi8_uni.c newlib/libc/iconv/ccs/ksx1001.c newlib/libc/iconv/ccs/mktbl.pl newlib/libc/iconv/ccs/win_1250.c newlib/libc/iconv/ccs/win_1251.c newlib/libc/iconv/ccs/win_1252.c newlib/libc/iconv/ccs/win_1253.c newlib/libc/iconv/ccs/win_1254.c newlib/libc/iconv/ccs/win_1255.c newlib/libc/iconv/ccs/win_1256.c newlib/libc/iconv/ccs/win_1257.c newlib/libc/iconv/ccs/win_1258.c newlib/libc/iconv/ces/Makefile.am newlib/libc/iconv/ces/Makefile.in newlib/libc/iconv/ces/cesbi.c newlib/libc/iconv/ces/cesbi.h newlib/libc/iconv/ces/cesdeps.h newlib/libc/iconv/ces/euc.c newlib/libc/iconv/ces/mkdeps.pl newlib/libc/iconv/ces/table-pcs.c newlib/libc/iconv/ces/table.c newlib/libc/iconv/ces/ucs-2-internal.c newlib/libc/iconv/ces/ucs-2.c newlib/libc/iconv/ces/ucs-4-internal.c newlib/libc/iconv/ces/ucs-4.c newlib/libc/iconv/ces/us-ascii.c newlib/libc/iconv/ces/utf-16.c newlib/libc/iconv/ces/utf-8.c newlib/libc/iconv/encoding.aliases newlib/libc/iconv/iconv.tex newlib/libc/iconv/lib/Makefile.am newlib/libc/iconv/lib/Makefile.in newlib/libc/iconv/lib/aliasesbi.c newlib/libc/iconv/lib/aliasesi.c newlib/libc/iconv/lib/conv.h newlib/libc/iconv/lib/encnames.h newlib/libc/iconv/lib/encoding.deps newlib/libc/iconv/lib/endian.h newlib/libc/iconv/lib/iconv.c newlib/libc/iconv/lib/iconvnls.c newlib/libc/iconv/lib/iconvnls.h newlib/libc/iconv/lib/local.h newlib/libc/iconv/lib/nullconv.c newlib/libc/iconv/lib/ucsconv.c newlib/libc/iconv/lib/ucsconv.h newlib/libc/include/_ansi.h newlib/libc/include/_syslist.h newlib/libc/include/alloca.h newlib/libc/include/ar.h newlib/libc/include/argz.h newlib/libc/include/assert.h newlib/libc/include/ctype.h newlib/libc/include/dirent.h newlib/libc/include/envz.h newlib/libc/include/errno.h newlib/libc/include/fastmath.h newlib/libc/include/fcntl.h newlib/libc/include/getopt.h newlib/libc/include/grp.h newlib/libc/include/iconv.h newlib/libc/include/ieeefp.h newlib/libc/include/inttypes.h newlib/libc/include/langinfo.h newlib/libc/include/libgen.h newlib/libc/include/limits.h newlib/libc/include/locale.h newlib/libc/include/machine/_default_types.h newlib/libc/include/machine/_types.h newlib/libc/include/machine/ansi.h newlib/libc/include/machine/endian.h newlib/libc/include/machine/fastmath.h newlib/libc/include/machine/ieeefp.h newlib/libc/include/machine/malloc.h newlib/libc/include/machine/param.h newlib/libc/include/machine/setjmp-dj.h newlib/libc/include/machine/setjmp.h newlib/libc/include/machine/stdlib.h newlib/libc/include/machine/termios.h newlib/libc/include/machine/time.h newlib/libc/include/machine/types.h newlib/libc/include/malloc.h newlib/libc/include/math.h newlib/libc/include/newlib.h newlib/libc/include/paths.h newlib/libc/include/process.h newlib/libc/include/pthread.h newlib/libc/include/pwd.h newlib/libc/include/reent.h newlib/libc/include/regdef.h newlib/libc/include/sched.h newlib/libc/include/search.h newlib/libc/include/setjmp.h newlib/libc/include/signal.h newlib/libc/include/stdint.h newlib/libc/include/stdio.h newlib/libc/include/stdlib.h newlib/libc/include/string.h newlib/libc/include/sys/_default_fcntl.h newlib/libc/include/sys/_types.h newlib/libc/include/sys/cdefs.h newlib/libc/include/sys/config.h newlib/libc/include/sys/custom_file.h newlib/libc/include/sys/dirent.h newlib/libc/include/sys/errno.h newlib/libc/include/sys/fcntl.h newlib/libc/include/sys/features.h newlib/libc/include/sys/file.h newlib/libc/include/sys/iconvnls.h newlib/libc/include/sys/lock.h newlib/libc/include/sys/param.h newlib/libc/include/sys/queue.h newlib/libc/include/sys/reent.h newlib/libc/include/sys/resource.h newlib/libc/include/sys/sched.h newlib/libc/include/sys/signal.h newlib/libc/include/sys/stat.h newlib/libc/include/sys/stdio.h newlib/libc/include/sys/string.h newlib/libc/include/sys/syslimits.h newlib/libc/include/sys/time.h newlib/libc/include/sys/timeb.h newlib/libc/include/sys/times.h newlib/libc/include/sys/types.h newlib/libc/include/sys/unistd.h newlib/libc/include/sys/utime.h newlib/libc/include/sys/wait.h newlib/libc/include/tar.h newlib/libc/include/termios.h newlib/libc/include/time.h newlib/libc/include/unctrl.h newlib/libc/include/unistd.h newlib/libc/include/utime.h newlib/libc/include/utmp.h newlib/libc/include/wchar.h newlib/libc/include/wctype.h newlib/libc/libc.texinfo newlib/libc/locale/Makefile.am newlib/libc/locale/Makefile.in newlib/libc/locale/fix_grouping.c newlib/libc/locale/ldpart.c newlib/libc/locale/ldpart.h newlib/libc/locale/lmessages.c newlib/libc/locale/lmessages.h newlib/libc/locale/lmonetary.c newlib/libc/locale/lmonetary.h newlib/libc/locale/lnumeric.c newlib/libc/locale/lnumeric.h newlib/libc/locale/locale.c newlib/libc/locale/locale.tex newlib/libc/locale/nl_langinfo.3 newlib/libc/locale/nl_langinfo.c newlib/libc/locale/setlocale.h newlib/libc/locale/timelocal.c newlib/libc/locale/timelocal.h newlib/libc/machine/Makefile.am newlib/libc/machine/Makefile.in newlib/libc/machine/a29k/Makefile.am newlib/libc/machine/a29k/Makefile.in newlib/libc/machine/a29k/aclocal.m4 newlib/libc/machine/a29k/configure newlib/libc/machine/a29k/configure.in newlib/libc/machine/aclocal.m4 newlib/libc/machine/arm/Makefile.am newlib/libc/machine/arm/Makefile.in newlib/libc/machine/arm/access.c newlib/libc/machine/arm/aclocal.m4 newlib/libc/machine/arm/configure newlib/libc/machine/arm/configure.in newlib/libc/machine/arm/machine/endian.h newlib/libc/machine/arm/machine/param.h newlib/libc/machine/arm/setjmp.S newlib/libc/machine/bfin/Makefile.am newlib/libc/machine/bfin/Makefile.in newlib/libc/machine/bfin/aclocal.m4 newlib/libc/machine/bfin/configure newlib/libc/machine/bfin/configure.in newlib/libc/machine/bfin/longjmp.S newlib/libc/machine/bfin/setjmp.S newlib/libc/machine/configure newlib/libc/machine/configure.in newlib/libc/machine/cris/Makefile.am newlib/libc/machine/cris/Makefile.in newlib/libc/machine/cris/aclocal.m4 newlib/libc/machine/cris/configure newlib/libc/machine/cris/configure.in newlib/libc/machine/cris/include/pthread.h newlib/libc/machine/cris/libcdtor.c newlib/libc/machine/cris/memcpy.c newlib/libc/machine/cris/memmove.c newlib/libc/machine/cris/memset.c newlib/libc/machine/cris/setjmp.c newlib/libc/machine/cris/sys/errno.h newlib/libc/machine/cris/sys/fcntl.h newlib/libc/machine/cris/sys/signal.h newlib/libc/machine/crx/Makefile.am newlib/libc/machine/crx/Makefile.in newlib/libc/machine/crx/aclocal.m4 newlib/libc/machine/crx/configure newlib/libc/machine/crx/configure.in newlib/libc/machine/crx/getenv.c newlib/libc/machine/crx/setjmp.S newlib/libc/machine/crx/sys/asm.h newlib/libc/machine/crx/sys/libh.h newlib/libc/machine/crx/sys/syscall.h newlib/libc/machine/d10v/Makefile.am newlib/libc/machine/d10v/Makefile.in newlib/libc/machine/d10v/aclocal.m4 newlib/libc/machine/d10v/configure newlib/libc/machine/d10v/configure.in newlib/libc/machine/d10v/setjmp.S newlib/libc/machine/d30v/Makefile.am newlib/libc/machine/d30v/Makefile.in newlib/libc/machine/d30v/aclocal.m4 newlib/libc/machine/d30v/configure newlib/libc/machine/d30v/configure.in newlib/libc/machine/d30v/setjmp.S newlib/libc/machine/fr30/Makefile.am newlib/libc/machine/fr30/Makefile.in newlib/libc/machine/fr30/aclocal.m4 newlib/libc/machine/fr30/configure newlib/libc/machine/fr30/configure.in newlib/libc/machine/fr30/setjmp.S newlib/libc/machine/frv/Makefile.am newlib/libc/machine/frv/Makefile.in newlib/libc/machine/frv/aclocal.m4 newlib/libc/machine/frv/configure newlib/libc/machine/frv/configure.in newlib/libc/machine/frv/setjmp.S newlib/libc/machine/h8300/Makefile.am newlib/libc/machine/h8300/Makefile.in newlib/libc/machine/h8300/aclocal.m4 newlib/libc/machine/h8300/configure newlib/libc/machine/h8300/configure.in newlib/libc/machine/h8300/defines.h newlib/libc/machine/h8300/h8sx_strcpy.S newlib/libc/machine/h8300/memcpy.S newlib/libc/machine/h8300/memset.S newlib/libc/machine/h8300/reg_memcpy.S newlib/libc/machine/h8300/reg_memset.S newlib/libc/machine/h8300/setarch.h newlib/libc/machine/h8300/setjmp.S newlib/libc/machine/h8300/strcmp.S newlib/libc/machine/h8500/Makefile.am newlib/libc/machine/h8500/Makefile.in newlib/libc/machine/h8500/aclocal.m4 newlib/libc/machine/h8500/cmpsi.c newlib/libc/machine/h8500/configure newlib/libc/machine/h8500/configure.in newlib/libc/machine/h8500/divhi3.S newlib/libc/machine/h8500/divsi3.c newlib/libc/machine/h8500/mulhi3.c newlib/libc/machine/h8500/mulsi3.c newlib/libc/machine/h8500/negsi2.c newlib/libc/machine/h8500/psi.S newlib/libc/machine/h8500/setjmp.S newlib/libc/machine/h8500/shifts.c newlib/libc/machine/hppa/DEFS.h newlib/libc/machine/hppa/Makefile.am newlib/libc/machine/hppa/Makefile.in newlib/libc/machine/hppa/aclocal.m4 newlib/libc/machine/hppa/configure newlib/libc/machine/hppa/configure.in newlib/libc/machine/hppa/memchr.S newlib/libc/machine/hppa/memcmp.S newlib/libc/machine/hppa/memcpy.S newlib/libc/machine/hppa/memset.S newlib/libc/machine/hppa/pcc_prefix.s newlib/libc/machine/hppa/setjmp.S newlib/libc/machine/hppa/strcat.S newlib/libc/machine/hppa/strcmp.S newlib/libc/machine/hppa/strcpy.S newlib/libc/machine/hppa/strlen.S newlib/libc/machine/hppa/strncat.S newlib/libc/machine/hppa/strncmp.S newlib/libc/machine/hppa/strncpy.S newlib/libc/machine/i386/Makefile.am newlib/libc/machine/i386/Makefile.in newlib/libc/machine/i386/aclocal.m4 newlib/libc/machine/i386/configure newlib/libc/machine/i386/configure.in newlib/libc/machine/i386/f_atan2.S newlib/libc/machine/i386/f_atan2f.S newlib/libc/machine/i386/f_exp.c newlib/libc/machine/i386/f_expf.c newlib/libc/machine/i386/f_frexp.S newlib/libc/machine/i386/f_frexpf.S newlib/libc/machine/i386/f_ldexp.S newlib/libc/machine/i386/f_ldexpf.S newlib/libc/machine/i386/f_log.S newlib/libc/machine/i386/f_log10.S newlib/libc/machine/i386/f_log10f.S newlib/libc/machine/i386/f_logf.S newlib/libc/machine/i386/f_math.h newlib/libc/machine/i386/f_pow.c newlib/libc/machine/i386/f_powf.c newlib/libc/machine/i386/f_tan.S newlib/libc/machine/i386/f_tanf.S newlib/libc/machine/i386/i386mach.h newlib/libc/machine/i386/machine/fastmath.h newlib/libc/machine/i386/memchr.S newlib/libc/machine/i386/memcmp.S newlib/libc/machine/i386/memcpy.S newlib/libc/machine/i386/memmove.S newlib/libc/machine/i386/memset.S newlib/libc/machine/i386/setjmp.S newlib/libc/machine/i386/strchr.S newlib/libc/machine/i386/strlen.S newlib/libc/machine/i960/Makefile.am newlib/libc/machine/i960/Makefile.in newlib/libc/machine/i960/aclocal.m4 newlib/libc/machine/i960/configure newlib/libc/machine/i960/configure.in newlib/libc/machine/i960/memccpy.S newlib/libc/machine/i960/memccpy_ca.S newlib/libc/machine/i960/memchr.S newlib/libc/machine/i960/memchr_ca.S newlib/libc/machine/i960/memcmp.S newlib/libc/machine/i960/memcmp_ca.S newlib/libc/machine/i960/memcpy.S newlib/libc/machine/i960/memcpy_ca.S newlib/libc/machine/i960/memset.S newlib/libc/machine/i960/setjmp.S newlib/libc/machine/i960/strchr.S newlib/libc/machine/i960/strchr_ca.S newlib/libc/machine/i960/strcmp.S newlib/libc/machine/i960/strcmp_ca.S newlib/libc/machine/i960/strcpy.S newlib/libc/machine/i960/strcpy_ca.S newlib/libc/machine/i960/strcspn.S newlib/libc/machine/i960/strdup.S newlib/libc/machine/i960/strlen.S newlib/libc/machine/i960/strlen_ca.S newlib/libc/machine/i960/strncat.S newlib/libc/machine/i960/strncat_ca.S newlib/libc/machine/i960/strncmp.S newlib/libc/machine/i960/strncmp_ca.S newlib/libc/machine/i960/strncpy.S newlib/libc/machine/i960/strncpy_ca.S newlib/libc/machine/i960/strpbrk.S newlib/libc/machine/i960/strrchr.S newlib/libc/machine/iq2000/Makefile.am newlib/libc/machine/iq2000/Makefile.in newlib/libc/machine/iq2000/aclocal.m4 newlib/libc/machine/iq2000/configure newlib/libc/machine/iq2000/configure.in newlib/libc/machine/iq2000/setjmp.S newlib/libc/machine/m32c/Makefile.am newlib/libc/machine/m32c/Makefile.in newlib/libc/machine/m32c/aclocal.m4 newlib/libc/machine/m32c/configure newlib/libc/machine/m32c/configure.in newlib/libc/machine/m32c/setjmp.S newlib/libc/machine/m32r/Makefile.am newlib/libc/machine/m32r/Makefile.in newlib/libc/machine/m32r/aclocal.m4 newlib/libc/machine/m32r/configure newlib/libc/machine/m32r/configure.in newlib/libc/machine/m32r/setjmp.S newlib/libc/machine/m68hc11/Makefile.am newlib/libc/machine/m68hc11/Makefile.in newlib/libc/machine/m68hc11/aclocal.m4 newlib/libc/machine/m68hc11/configure newlib/libc/machine/m68hc11/configure.in newlib/libc/machine/m68hc11/setjmp.S newlib/libc/machine/m68k/Makefile.am newlib/libc/machine/m68k/Makefile.in newlib/libc/machine/m68k/aclocal.m4 newlib/libc/machine/m68k/configure newlib/libc/machine/m68k/configure.in newlib/libc/machine/m68k/m68kasm.h newlib/libc/machine/m68k/memcpy.S newlib/libc/machine/m68k/memset.S newlib/libc/machine/m68k/setjmp.S newlib/libc/machine/m68k/strcpy.c newlib/libc/machine/m68k/strlen.c newlib/libc/machine/m88k/Makefile.am newlib/libc/machine/m88k/Makefile.in newlib/libc/machine/m88k/aclocal.m4 newlib/libc/machine/m88k/configure newlib/libc/machine/m88k/configure.in newlib/libc/machine/m88k/setjmp.S newlib/libc/machine/mep/Makefile.am newlib/libc/machine/mep/Makefile.in newlib/libc/machine/mep/aclocal.m4 newlib/libc/machine/mep/configure newlib/libc/machine/mep/configure.in newlib/libc/machine/mep/setjmp.S newlib/libc/machine/mips/Makefile.am newlib/libc/machine/mips/Makefile.in newlib/libc/machine/mips/aclocal.m4 newlib/libc/machine/mips/configure newlib/libc/machine/mips/configure.in newlib/libc/machine/mips/machine/regdef.h newlib/libc/machine/mips/memcpy.c newlib/libc/machine/mips/memset.c newlib/libc/machine/mips/setjmp.S newlib/libc/machine/mips/strcmp.c newlib/libc/machine/mips/strlen.c newlib/libc/machine/mips/strncpy.c newlib/libc/machine/mn10200/Makefile.am newlib/libc/machine/mn10200/Makefile.in newlib/libc/machine/mn10200/aclocal.m4 newlib/libc/machine/mn10200/configure newlib/libc/machine/mn10200/configure.in newlib/libc/machine/mn10200/setjmp.S newlib/libc/machine/mn10300/Makefile.am newlib/libc/machine/mn10300/Makefile.in newlib/libc/machine/mn10300/aclocal.m4 newlib/libc/machine/mn10300/configure newlib/libc/machine/mn10300/configure.in newlib/libc/machine/mn10300/memchr.S newlib/libc/machine/mn10300/memcmp.S newlib/libc/machine/mn10300/memcpy.S newlib/libc/machine/mn10300/memset.S newlib/libc/machine/mn10300/setjmp.S newlib/libc/machine/mn10300/strchr.S newlib/libc/machine/mn10300/strcmp.S newlib/libc/machine/mn10300/strcpy.S newlib/libc/machine/mn10300/strlen.S newlib/libc/machine/mt/Makefile.am newlib/libc/machine/mt/Makefile.in newlib/libc/machine/mt/aclocal.m4 newlib/libc/machine/mt/configure newlib/libc/machine/mt/configure.in newlib/libc/machine/mt/setjmp.S newlib/libc/machine/necv70/Makefile.am newlib/libc/machine/necv70/Makefile.in newlib/libc/machine/necv70/aclocal.m4 newlib/libc/machine/necv70/configure newlib/libc/machine/necv70/configure.in newlib/libc/machine/necv70/fastmath.S newlib/libc/machine/necv70/machine/registers.h newlib/libc/machine/necv70/necv70.tex newlib/libc/machine/necv70/setjmp.S newlib/libc/machine/powerpc/Makefile.am newlib/libc/machine/powerpc/Makefile.in newlib/libc/machine/powerpc/aclocal.m4 newlib/libc/machine/powerpc/atosfix16.c newlib/libc/machine/powerpc/atosfix32.c newlib/libc/machine/powerpc/atosfix64.c newlib/libc/machine/powerpc/atoufix16.c newlib/libc/machine/powerpc/atoufix32.c newlib/libc/machine/powerpc/atoufix64.c newlib/libc/machine/powerpc/configure newlib/libc/machine/powerpc/configure.in newlib/libc/machine/powerpc/fix64.h newlib/libc/machine/powerpc/machine/malloc.h newlib/libc/machine/powerpc/machine/stdlib.h newlib/libc/machine/powerpc/setjmp.S newlib/libc/machine/powerpc/simdldtoa.c newlib/libc/machine/powerpc/strtosfix16.c newlib/libc/machine/powerpc/strtosfix32.c newlib/libc/machine/powerpc/strtosfix64.c newlib/libc/machine/powerpc/strtoufix16.c newlib/libc/machine/powerpc/strtoufix32.c newlib/libc/machine/powerpc/strtoufix64.c newlib/libc/machine/powerpc/times.c newlib/libc/machine/powerpc/ufix64toa.c newlib/libc/machine/powerpc/vec_calloc.c newlib/libc/machine/powerpc/vec_free.c newlib/libc/machine/powerpc/vec_malloc.c newlib/libc/machine/powerpc/vec_mallocr.c newlib/libc/machine/powerpc/vec_realloc.c newlib/libc/machine/powerpc/vfprintf.c newlib/libc/machine/powerpc/vfscanf.c newlib/libc/machine/sh/Makefile.am newlib/libc/machine/sh/Makefile.in newlib/libc/machine/sh/aclocal.m4 newlib/libc/machine/sh/asm.h newlib/libc/machine/sh/configure newlib/libc/machine/sh/configure.in newlib/libc/machine/sh/memcpy.S newlib/libc/machine/sh/memset.S newlib/libc/machine/sh/setjmp.S newlib/libc/machine/sh/strcmp.S newlib/libc/machine/sh/strcpy.S newlib/libc/machine/sh/strlen.S newlib/libc/machine/sh/strncpy.S newlib/libc/machine/sparc/Makefile.am newlib/libc/machine/sparc/Makefile.in newlib/libc/machine/sparc/aclocal.m4 newlib/libc/machine/sparc/configure newlib/libc/machine/sparc/configure.in newlib/libc/machine/sparc/machine/sparclet.h newlib/libc/machine/sparc/scan.c newlib/libc/machine/sparc/setjmp.S newlib/libc/machine/sparc/shuffle.c newlib/libc/machine/spu/Makefile.am newlib/libc/machine/spu/Makefile.in newlib/libc/machine/spu/aclocal.m4 newlib/libc/machine/spu/c99ppe.h newlib/libc/machine/spu/clearerr.c newlib/libc/machine/spu/configure newlib/libc/machine/spu/configure.in newlib/libc/machine/spu/creat.c newlib/libc/machine/spu/fclose.c newlib/libc/machine/spu/feof.c newlib/libc/machine/spu/ferror.c newlib/libc/machine/spu/fflush.c newlib/libc/machine/spu/fgetc.c newlib/libc/machine/spu/fgetpos.c newlib/libc/machine/spu/fgets.c newlib/libc/machine/spu/fileno.c newlib/libc/machine/spu/fiprintf.S newlib/libc/machine/spu/fiscanf.S newlib/libc/machine/spu/fopen.c newlib/libc/machine/spu/fprintf.S newlib/libc/machine/spu/fputc.c newlib/libc/machine/spu/fputs.c newlib/libc/machine/spu/fread.c newlib/libc/machine/spu/freopen.c newlib/libc/machine/spu/fscanf.S newlib/libc/machine/spu/fseek.c newlib/libc/machine/spu/fsetpos.c newlib/libc/machine/spu/ftell.c newlib/libc/machine/spu/fwrite.c newlib/libc/machine/spu/getc.c newlib/libc/machine/spu/getchar.c newlib/libc/machine/spu/gets.c newlib/libc/machine/spu/include/fenv.h newlib/libc/machine/spu/iprintf.S newlib/libc/machine/spu/iscanf.S newlib/libc/machine/spu/machine/_types.h newlib/libc/machine/spu/memcpy.c newlib/libc/machine/spu/memmove.c newlib/libc/machine/spu/memset.c newlib/libc/machine/spu/mk_syscalls newlib/libc/machine/spu/perror.c newlib/libc/machine/spu/printf.S newlib/libc/machine/spu/putc.c newlib/libc/machine/spu/putchar.c newlib/libc/machine/spu/puts.c newlib/libc/machine/spu/remove.c newlib/libc/machine/spu/rename.c newlib/libc/machine/spu/rewind.c newlib/libc/machine/spu/scanf.S newlib/libc/machine/spu/setbuf.c newlib/libc/machine/spu/setjmp.S newlib/libc/machine/spu/setvbuf.c newlib/libc/machine/spu/siprintf.S newlib/libc/machine/spu/siscanf.S newlib/libc/machine/spu/sleep.c newlib/libc/machine/spu/sniprintf.S newlib/libc/machine/spu/snprintf.S newlib/libc/machine/spu/sprintf.S newlib/libc/machine/spu/sscanf.S newlib/libc/machine/spu/stack_reg_va.S newlib/libc/machine/spu/stdio.c newlib/libc/machine/spu/straddr.h newlib/libc/machine/spu/strcat.c newlib/libc/machine/spu/strchr.c newlib/libc/machine/spu/strcmp.c newlib/libc/machine/spu/strcpy.c newlib/libc/machine/spu/strcpy.h newlib/libc/machine/spu/strcspn.c newlib/libc/machine/spu/strlen.c newlib/libc/machine/spu/strncat.c newlib/libc/machine/spu/strncmp.c newlib/libc/machine/spu/strncpy.c newlib/libc/machine/spu/strpbrk.c newlib/libc/machine/spu/strrchr.c newlib/libc/machine/spu/strspn.c newlib/libc/machine/spu/strxfrm.c newlib/libc/machine/spu/sys/custom_file.h newlib/libc/machine/spu/sys/dirent.h newlib/libc/machine/spu/sys/errno.h newlib/libc/machine/spu/sys/fenv.h newlib/libc/machine/spu/sys/sched.h newlib/libc/machine/spu/sys/syscall.h newlib/libc/machine/spu/sys/uio.h newlib/libc/machine/spu/sys/utime.h newlib/libc/machine/spu/syscall.def newlib/libc/machine/spu/tmpfile.c newlib/libc/machine/spu/tmpnam.c newlib/libc/machine/spu/ungetc.c newlib/libc/machine/spu/usleep.c newlib/libc/machine/spu/vec_literal.h newlib/libc/machine/spu/vfiprintf.c newlib/libc/machine/spu/vfiscanf.c newlib/libc/machine/spu/vfprintf.c newlib/libc/machine/spu/vfscanf.c newlib/libc/machine/spu/viprintf.c newlib/libc/machine/spu/viscanf.c newlib/libc/machine/spu/vprintf.c newlib/libc/machine/spu/vscanf.c newlib/libc/machine/spu/vsiprintf.c newlib/libc/machine/spu/vsiscanf.c newlib/libc/machine/spu/vsniprintf.c newlib/libc/machine/spu/vsnprintf.c newlib/libc/machine/spu/vsprintf.c newlib/libc/machine/spu/vsscanf.c newlib/libc/machine/tic4x/Makefile.am newlib/libc/machine/tic4x/Makefile.in newlib/libc/machine/tic4x/aclocal.m4 newlib/libc/machine/tic4x/configure newlib/libc/machine/tic4x/configure.in newlib/libc/machine/tic4x/setjmp.S newlib/libc/machine/tic80/Makefile.am newlib/libc/machine/tic80/Makefile.in newlib/libc/machine/tic80/aclocal.m4 newlib/libc/machine/tic80/configure newlib/libc/machine/tic80/configure.in newlib/libc/machine/tic80/setjmp.S newlib/libc/machine/v850/Makefile.am newlib/libc/machine/v850/Makefile.in newlib/libc/machine/v850/aclocal.m4 newlib/libc/machine/v850/configure newlib/libc/machine/v850/configure.in newlib/libc/machine/v850/setjmp.S newlib/libc/machine/w65/Makefile.am newlib/libc/machine/w65/Makefile.in newlib/libc/machine/w65/aclocal.m4 newlib/libc/machine/w65/cmpsi.c newlib/libc/machine/w65/configure newlib/libc/machine/w65/configure.in newlib/libc/machine/w65/divsi3.c newlib/libc/machine/w65/lshrhi.S newlib/libc/machine/w65/mulsi3.c newlib/libc/machine/w65/sdivhi3.S newlib/libc/machine/w65/smulhi3.S newlib/libc/machine/w65/udivhi3.S newlib/libc/machine/w65/umodhi3.S newlib/libc/machine/x86_64/Makefile.am newlib/libc/machine/x86_64/Makefile.in newlib/libc/machine/x86_64/aclocal.m4 newlib/libc/machine/x86_64/configure newlib/libc/machine/x86_64/configure.in newlib/libc/machine/x86_64/memcpy.S newlib/libc/machine/x86_64/memset.S newlib/libc/machine/x86_64/setjmp.S newlib/libc/machine/x86_64/x86_64mach.h newlib/libc/machine/xscale/Makefile.am newlib/libc/machine/xscale/Makefile.in newlib/libc/machine/xscale/aclocal.m4 newlib/libc/machine/xscale/configure newlib/libc/machine/xscale/configure.in newlib/libc/machine/xscale/machine/profile.h newlib/libc/machine/xscale/memchr.c newlib/libc/machine/xscale/memcmp.c newlib/libc/machine/xscale/memcpy.c newlib/libc/machine/xscale/memmove.c newlib/libc/machine/xscale/memset.c newlib/libc/machine/xscale/setjmp.S newlib/libc/machine/xscale/strchr.c newlib/libc/machine/xscale/strcmp.c newlib/libc/machine/xscale/strcpy.c newlib/libc/machine/xscale/strlen.c newlib/libc/machine/xscale/xscale.h newlib/libc/machine/xstormy16/Makefile.am newlib/libc/machine/xstormy16/Makefile.in newlib/libc/machine/xstormy16/aclocal.m4 newlib/libc/machine/xstormy16/configure newlib/libc/machine/xstormy16/configure.in newlib/libc/machine/xstormy16/mallocr.c newlib/libc/machine/xstormy16/setjmp.S newlib/libc/machine/xstormy16/tiny-malloc.c newlib/libc/machine/z8k/Makefile.am newlib/libc/machine/z8k/Makefile.in newlib/libc/machine/z8k/aclocal.m4 newlib/libc/machine/z8k/args.h newlib/libc/machine/z8k/configure newlib/libc/machine/z8k/configure.in newlib/libc/machine/z8k/memcmp.S newlib/libc/machine/z8k/memcpy.S newlib/libc/machine/z8k/memmove.S newlib/libc/machine/z8k/memset.S newlib/libc/machine/z8k/setjmp.S newlib/libc/misc/Makefile.am newlib/libc/misc/Makefile.in newlib/libc/misc/__dprintf.c newlib/libc/misc/ffs.c newlib/libc/misc/init.c newlib/libc/misc/misc.tex newlib/libc/misc/unctrl.c newlib/libc/posix/Makefile.am newlib/libc/posix/Makefile.in newlib/libc/posix/_isatty.c newlib/libc/posix/closedir.c newlib/libc/posix/creat.c newlib/libc/posix/execl.c newlib/libc/posix/execle.c newlib/libc/posix/execlp.c newlib/libc/posix/execv.c newlib/libc/posix/execve.c newlib/libc/posix/execvp.c newlib/libc/posix/isatty.c newlib/libc/posix/opendir.c newlib/libc/posix/popen.c newlib/libc/posix/readdir.c newlib/libc/posix/readdir_r.c newlib/libc/posix/rewinddir.c newlib/libc/posix/scandir.c newlib/libc/posix/seekdir.c newlib/libc/posix/sleep.c newlib/libc/posix/telldir.c newlib/libc/posix/usleep.c newlib/libc/reent/Makefile.am newlib/libc/reent/Makefile.in newlib/libc/reent/closer.c newlib/libc/reent/execr.c newlib/libc/reent/fcntlr.c newlib/libc/reent/fstat64r.c newlib/libc/reent/fstatr.c newlib/libc/reent/getreent.c newlib/libc/reent/gettimeofdayr.c newlib/libc/reent/impure.c newlib/libc/reent/isattyr.c newlib/libc/reent/linkr.c newlib/libc/reent/lseek64r.c newlib/libc/reent/lseekr.c newlib/libc/reent/open64r.c newlib/libc/reent/openr.c newlib/libc/reent/readr.c newlib/libc/reent/reent.c newlib/libc/reent/reent.tex newlib/libc/reent/renamer.c newlib/libc/reent/sbrkr.c newlib/libc/reent/signalr.c newlib/libc/reent/signgam.c newlib/libc/reent/statr.c newlib/libc/reent/timesr.c newlib/libc/reent/unlinkr.c newlib/libc/reent/writer.c newlib/libc/saber newlib/libc/search/Makefile.am newlib/libc/search/Makefile.in newlib/libc/search/bsearch.c newlib/libc/search/db_local.h newlib/libc/search/extern.h newlib/libc/search/hash.c newlib/libc/search/hash.h newlib/libc/search/hash_bigkey.c newlib/libc/search/hash_buf.c newlib/libc/search/hash_func.c newlib/libc/search/hash_log2.c newlib/libc/search/hash_page.c newlib/libc/search/hcreate.3 newlib/libc/search/hcreate.c newlib/libc/search/hcreate_r.c newlib/libc/search/page.h newlib/libc/search/qsort.c newlib/libc/search/tdelete.c newlib/libc/search/tdestroy.c newlib/libc/search/tfind.c newlib/libc/search/tsearch.3 newlib/libc/search/tsearch.c newlib/libc/search/twalk.c newlib/libc/signal/Makefile.am newlib/libc/signal/Makefile.in newlib/libc/signal/raise.c newlib/libc/signal/signal.c newlib/libc/signal/signal.tex newlib/libc/stdio/Makefile.am newlib/libc/stdio/Makefile.in newlib/libc/stdio/asiprintf.c newlib/libc/stdio/asniprintf.c newlib/libc/stdio/asnprintf.c newlib/libc/stdio/asprintf.c newlib/libc/stdio/clearerr.c newlib/libc/stdio/diprintf.c newlib/libc/stdio/dprintf.c newlib/libc/stdio/fclose.c newlib/libc/stdio/fcloseall.c newlib/libc/stdio/fdopen.c newlib/libc/stdio/feof.c newlib/libc/stdio/ferror.c newlib/libc/stdio/fflush.c newlib/libc/stdio/fgetc.c newlib/libc/stdio/fgetpos.c newlib/libc/stdio/fgets.c newlib/libc/stdio/fileno.c newlib/libc/stdio/findfp.c newlib/libc/stdio/fiprintf.c newlib/libc/stdio/fiscanf.c newlib/libc/stdio/flags.c newlib/libc/stdio/floatio.h newlib/libc/stdio/fmemopen.c newlib/libc/stdio/fopen.c newlib/libc/stdio/fopencookie.c newlib/libc/stdio/fprintf.c newlib/libc/stdio/fputc.c newlib/libc/stdio/fputs.c newlib/libc/stdio/fread.c newlib/libc/stdio/freopen.c newlib/libc/stdio/fscanf.c newlib/libc/stdio/fseek.c newlib/libc/stdio/fseeko.c newlib/libc/stdio/fsetpos.c newlib/libc/stdio/ftell.c newlib/libc/stdio/ftello.c newlib/libc/stdio/funopen.c newlib/libc/stdio/fvwrite.c newlib/libc/stdio/fvwrite.h newlib/libc/stdio/fwalk.c newlib/libc/stdio/fwrite.c newlib/libc/stdio/getc.c newlib/libc/stdio/getc_u.c newlib/libc/stdio/getchar.c newlib/libc/stdio/getchar_u.c newlib/libc/stdio/getdelim.c newlib/libc/stdio/getline.c newlib/libc/stdio/gets.c newlib/libc/stdio/getw.c newlib/libc/stdio/iprintf.c newlib/libc/stdio/iscanf.c newlib/libc/stdio/local.h newlib/libc/stdio/makebuf.c newlib/libc/stdio/mktemp.c newlib/libc/stdio/open_memstream.c newlib/libc/stdio/perror.c newlib/libc/stdio/printf.c newlib/libc/stdio/putc.c newlib/libc/stdio/putc_u.c newlib/libc/stdio/putchar.c newlib/libc/stdio/putchar_u.c newlib/libc/stdio/puts.c newlib/libc/stdio/putw.c newlib/libc/stdio/refill.c newlib/libc/stdio/remove.c newlib/libc/stdio/rename.c newlib/libc/stdio/rewind.c newlib/libc/stdio/rget.c newlib/libc/stdio/scanf.c newlib/libc/stdio/sccl.c newlib/libc/stdio/setbuf.c newlib/libc/stdio/setbuffer.c newlib/libc/stdio/setlinebuf.c newlib/libc/stdio/setvbuf.c newlib/libc/stdio/siprintf.c newlib/libc/stdio/siscanf.c newlib/libc/stdio/sniprintf.c newlib/libc/stdio/snprintf.c newlib/libc/stdio/sprintf.c newlib/libc/stdio/sscanf.c newlib/libc/stdio/stdio.c newlib/libc/stdio/stdio.tex newlib/libc/stdio/tmpfile.c newlib/libc/stdio/tmpnam.c newlib/libc/stdio/ungetc.c newlib/libc/stdio/vasiprintf.c newlib/libc/stdio/vasniprintf.c newlib/libc/stdio/vasnprintf.c newlib/libc/stdio/vasprintf.c newlib/libc/stdio/vdiprintf.c newlib/libc/stdio/vdprintf.c newlib/libc/stdio/vfieeefp.h newlib/libc/stdio/vfprintf.c newlib/libc/stdio/vfscanf.c newlib/libc/stdio/viprintf.c newlib/libc/stdio/viscanf.c newlib/libc/stdio/vprintf.c newlib/libc/stdio/vscanf.c newlib/libc/stdio/vsiprintf.c newlib/libc/stdio/vsiscanf.c newlib/libc/stdio/vsniprintf.c newlib/libc/stdio/vsnprintf.c newlib/libc/stdio/vsprintf.c newlib/libc/stdio/vsscanf.c newlib/libc/stdio/wbuf.c newlib/libc/stdio/wsetup.c newlib/libc/stdio64/Makefile.am newlib/libc/stdio64/Makefile.in newlib/libc/stdio64/dummy.c newlib/libc/stdio64/fdopen64.c newlib/libc/stdio64/fgetpos64.c newlib/libc/stdio64/fopen64.c newlib/libc/stdio64/freopen64.c newlib/libc/stdio64/fseeko64.c newlib/libc/stdio64/fsetpos64.c newlib/libc/stdio64/ftello64.c newlib/libc/stdio64/stdio64.c newlib/libc/stdio64/stdio64.tex newlib/libc/stdio64/tmpfile64.c newlib/libc/stdlib/Makefile.am newlib/libc/stdlib/Makefile.in newlib/libc/stdlib/_Exit.c newlib/libc/stdlib/__adjust.c newlib/libc/stdlib/__atexit.c newlib/libc/stdlib/__call_atexit.c newlib/libc/stdlib/__exp10.c newlib/libc/stdlib/__ten_mu.c newlib/libc/stdlib/a64l.c newlib/libc/stdlib/abort.c newlib/libc/stdlib/abs.c newlib/libc/stdlib/assert.c newlib/libc/stdlib/atexit.c newlib/libc/stdlib/atexit.h newlib/libc/stdlib/atof.c newlib/libc/stdlib/atoff.c newlib/libc/stdlib/atoi.c newlib/libc/stdlib/atol.c newlib/libc/stdlib/atoll.c newlib/libc/stdlib/btowc.c newlib/libc/stdlib/calloc.c newlib/libc/stdlib/cxa_atexit.c newlib/libc/stdlib/cxa_finalize.c newlib/libc/stdlib/div.c newlib/libc/stdlib/drand48.c newlib/libc/stdlib/dtoa.c newlib/libc/stdlib/dtoastub.c newlib/libc/stdlib/ecvtbuf.c newlib/libc/stdlib/efgcvt.c newlib/libc/stdlib/environ.c newlib/libc/stdlib/envlock.c newlib/libc/stdlib/envlock.h newlib/libc/stdlib/eprintf.c newlib/libc/stdlib/erand48.c newlib/libc/stdlib/exit.c newlib/libc/stdlib/gd_qnan.h newlib/libc/stdlib/gdtoa-gethex.c newlib/libc/stdlib/gdtoa-hexnan.c newlib/libc/stdlib/gdtoa.h newlib/libc/stdlib/getenv.c newlib/libc/stdlib/getenv_r.c newlib/libc/stdlib/getopt.c newlib/libc/stdlib/getsubopt.3 newlib/libc/stdlib/getsubopt.c newlib/libc/stdlib/jrand48.c newlib/libc/stdlib/l64a.c newlib/libc/stdlib/labs.c newlib/libc/stdlib/lcong48.c newlib/libc/stdlib/ldiv.c newlib/libc/stdlib/ldtoa.c newlib/libc/stdlib/llabs.c newlib/libc/stdlib/lldiv.c newlib/libc/stdlib/local.h newlib/libc/stdlib/lrand48.c newlib/libc/stdlib/malign.c newlib/libc/stdlib/malloc.c newlib/libc/stdlib/mallocr.c newlib/libc/stdlib/mbctype.h newlib/libc/stdlib/mblen.c newlib/libc/stdlib/mblen_r.c newlib/libc/stdlib/mbrlen.c newlib/libc/stdlib/mbrtowc.c newlib/libc/stdlib/mbsinit.c newlib/libc/stdlib/mbsrtowcs.c newlib/libc/stdlib/mbstowcs.c newlib/libc/stdlib/mbstowcs_r.c newlib/libc/stdlib/mbtowc.c newlib/libc/stdlib/mbtowc_r.c newlib/libc/stdlib/mlock.c newlib/libc/stdlib/mprec.c newlib/libc/stdlib/mprec.h newlib/libc/stdlib/mrand48.c newlib/libc/stdlib/msize.c newlib/libc/stdlib/mstats.c newlib/libc/stdlib/mtrim.c newlib/libc/stdlib/nrand48.c newlib/libc/stdlib/on_exit.c newlib/libc/stdlib/putenv.c newlib/libc/stdlib/putenv_r.c newlib/libc/stdlib/rand.c newlib/libc/stdlib/rand48.c newlib/libc/stdlib/rand48.h newlib/libc/stdlib/rand_r.c newlib/libc/stdlib/realloc.c newlib/libc/stdlib/seed48.c newlib/libc/stdlib/setenv.c newlib/libc/stdlib/setenv_r.c newlib/libc/stdlib/srand48.c newlib/libc/stdlib/std.h newlib/libc/stdlib/stdlib.tex newlib/libc/stdlib/strtod.c newlib/libc/stdlib/strtol.c newlib/libc/stdlib/strtoll.c newlib/libc/stdlib/strtoll_r.c newlib/libc/stdlib/strtoul.c newlib/libc/stdlib/strtoull.c newlib/libc/stdlib/strtoull_r.c newlib/libc/stdlib/system.c newlib/libc/stdlib/valloc.c newlib/libc/stdlib/wcrtomb.c newlib/libc/stdlib/wcsrtombs.c newlib/libc/stdlib/wcstol.c newlib/libc/stdlib/wcstoll.c newlib/libc/stdlib/wcstoll_r.c newlib/libc/stdlib/wcstombs.c newlib/libc/stdlib/wcstombs_r.c newlib/libc/stdlib/wcstoul.c newlib/libc/stdlib/wcstoull.c newlib/libc/stdlib/wcstoull_r.c newlib/libc/stdlib/wctob.c newlib/libc/stdlib/wctomb.c newlib/libc/stdlib/wctomb_r.c newlib/libc/string/Makefile.am newlib/libc/string/Makefile.in newlib/libc/string/bcmp.c newlib/libc/string/bcopy.c newlib/libc/string/bzero.c newlib/libc/string/index.c newlib/libc/string/memccpy.c newlib/libc/string/memchr.c newlib/libc/string/memcmp.c newlib/libc/string/memcpy.c newlib/libc/string/memmem.c newlib/libc/string/memmove.c newlib/libc/string/mempcpy.c newlib/libc/string/memset.c newlib/libc/string/rindex.c newlib/libc/string/stpcpy.c newlib/libc/string/stpncpy.c newlib/libc/string/str-two-way.h newlib/libc/string/strcasecmp.c newlib/libc/string/strcasestr.c newlib/libc/string/strcat.c newlib/libc/string/strchr.c newlib/libc/string/strcmp.c newlib/libc/string/strcoll.c newlib/libc/string/strcpy.c newlib/libc/string/strcspn.c newlib/libc/string/strdup.c newlib/libc/string/strdup_r.c newlib/libc/string/strerror.c newlib/libc/string/strerror_r.c newlib/libc/string/strings.tex newlib/libc/string/strlcat.c newlib/libc/string/strlcpy.c newlib/libc/string/strlen.c newlib/libc/string/strlwr.c newlib/libc/string/strncasecmp.c newlib/libc/string/strncat.c newlib/libc/string/strncmp.c newlib/libc/string/strncpy.c newlib/libc/string/strndup.c newlib/libc/string/strndup_r.c newlib/libc/string/strnlen.c newlib/libc/string/strpbrk.c newlib/libc/string/strrchr.c newlib/libc/string/strsep.c newlib/libc/string/strspn.c newlib/libc/string/strstr.c newlib/libc/string/strtok.c newlib/libc/string/strtok_r.c newlib/libc/string/strupr.c newlib/libc/string/strxfrm.c newlib/libc/string/swab.c newlib/libc/string/u_strerr.c newlib/libc/string/wcpcpy.c newlib/libc/string/wcpncpy.c newlib/libc/string/wcscat.c newlib/libc/string/wcschr.c newlib/libc/string/wcscmp.c newlib/libc/string/wcscoll.c newlib/libc/string/wcscpy.c newlib/libc/string/wcscspn.c newlib/libc/string/wcslcat.c newlib/libc/string/wcslcpy.c newlib/libc/string/wcslen.c newlib/libc/string/wcsncat.c newlib/libc/string/wcsncmp.c newlib/libc/string/wcsncpy.c newlib/libc/string/wcsnlen.c newlib/libc/string/wcspbrk.c newlib/libc/string/wcsrchr.c newlib/libc/string/wcsspn.c newlib/libc/string/wcsstr.c newlib/libc/string/wcstrings.tex newlib/libc/string/wcswidth.c newlib/libc/string/wcsxfrm.c newlib/libc/string/wcwidth.c newlib/libc/string/wmemchr.c newlib/libc/string/wmemcmp.c newlib/libc/string/wmemcpy.c newlib/libc/string/wmemmove.c newlib/libc/string/wmemset.c newlib/libc/sys.tex newlib/libc/sys/Makefile.am newlib/libc/sys/Makefile.in newlib/libc/sys/a29khif/Makefile.am newlib/libc/sys/a29khif/Makefile.in newlib/libc/sys/a29khif/_alloc.S newlib/libc/sys/a29khif/_close.S newlib/libc/sys/a29khif/_cycles.S newlib/libc/sys/a29khif/_exit.S newlib/libc/sys/a29khif/_fstat.S newlib/libc/sys/a29khif/_getpsiz.S newlib/libc/sys/a29khif/_gettz.S newlib/libc/sys/a29khif/_ioctl.S newlib/libc/sys/a29khif/_iostat.S newlib/libc/sys/a29khif/_iowait.S newlib/libc/sys/a29khif/_isatty.S newlib/libc/sys/a29khif/_lseek.S newlib/libc/sys/a29khif/_open.S newlib/libc/sys/a29khif/_query.S newlib/libc/sys/a29khif/_read.S newlib/libc/sys/a29khif/_sbrk.S newlib/libc/sys/a29khif/_setim.S newlib/libc/sys/a29khif/_settrap.S newlib/libc/sys/a29khif/_setvec.S newlib/libc/sys/a29khif/_tmpnam.S newlib/libc/sys/a29khif/_write.S newlib/libc/sys/a29khif/aclocal.m4 newlib/libc/sys/a29khif/alloc.S newlib/libc/sys/a29khif/clock.S newlib/libc/sys/a29khif/configure newlib/libc/sys/a29khif/configure.in newlib/libc/sys/a29khif/crt0.S newlib/libc/sys/a29khif/getargs.S newlib/libc/sys/a29khif/getenv.S newlib/libc/sys/a29khif/getpid.c newlib/libc/sys/a29khif/kill.c newlib/libc/sys/a29khif/read.S newlib/libc/sys/a29khif/remove.S newlib/libc/sys/a29khif/rename.S newlib/libc/sys/a29khif/signal.S newlib/libc/sys/a29khif/stubs.S newlib/libc/sys/a29khif/sys/cpudef.h newlib/libc/sys/a29khif/sys/fpsymbol.h newlib/libc/sys/a29khif/sys/intrinsi.h newlib/libc/sys/a29khif/sys/macros.h newlib/libc/sys/a29khif/sys/proreg.h newlib/libc/sys/a29khif/sys/romdcl.h newlib/libc/sys/a29khif/sys/smartmac.h newlib/libc/sys/a29khif/sys/sysmac.h newlib/libc/sys/a29khif/systime.S newlib/libc/sys/a29khif/vec.S newlib/libc/sys/aclocal.m4 newlib/libc/sys/arc/Makefile.am newlib/libc/sys/arc/Makefile.in newlib/libc/sys/arc/aclocal.m4 newlib/libc/sys/arc/configure newlib/libc/sys/arc/configure.in newlib/libc/sys/arc/crt0.S newlib/libc/sys/arc/dummy.S newlib/libc/sys/arc/isatty.c newlib/libc/sys/arc/mem-layout.c newlib/libc/sys/arc/sbrk.c newlib/libc/sys/arc/sys/syscall.h newlib/libc/sys/arc/syscalls.c newlib/libc/sys/arm/Makefile.am newlib/libc/sys/arm/Makefile.in newlib/libc/sys/arm/aclocal.m4 newlib/libc/sys/arm/aeabi_atexit.c newlib/libc/sys/arm/configure newlib/libc/sys/arm/configure.in newlib/libc/sys/arm/crt0.S newlib/libc/sys/arm/libcfunc.c newlib/libc/sys/arm/swi.h newlib/libc/sys/arm/sys/fcntl.h newlib/libc/sys/arm/sys/param.h newlib/libc/sys/arm/syscalls.c newlib/libc/sys/arm/trap.S newlib/libc/sys/configure newlib/libc/sys/configure.in newlib/libc/sys/d10v/Makefile.am newlib/libc/sys/d10v/Makefile.in newlib/libc/sys/d10v/aclocal.m4 newlib/libc/sys/d10v/configure newlib/libc/sys/d10v/configure.in newlib/libc/sys/d10v/creat.c newlib/libc/sys/d10v/crt0.S newlib/libc/sys/d10v/sys/syscall.h newlib/libc/sys/d10v/syscalls.c newlib/libc/sys/d10v/trap.S newlib/libc/sys/decstation/Makefile.am newlib/libc/sys/decstation/Makefile.in newlib/libc/sys/decstation/_main.c newlib/libc/sys/decstation/aclocal.m4 newlib/libc/sys/decstation/configure newlib/libc/sys/decstation/configure.in newlib/libc/sys/decstation/sys/dirent.h newlib/libc/sys/h8300hms/Makefile.am newlib/libc/sys/h8300hms/Makefile.in newlib/libc/sys/h8300hms/_exit.S newlib/libc/sys/h8300hms/aclocal.m4 newlib/libc/sys/h8300hms/close.S newlib/libc/sys/h8300hms/configure newlib/libc/sys/h8300hms/configure.in newlib/libc/sys/h8300hms/crt0.S newlib/libc/sys/h8300hms/crt1.c newlib/libc/sys/h8300hms/fstat.S newlib/libc/sys/h8300hms/lseek.S newlib/libc/sys/h8300hms/misc.c newlib/libc/sys/h8300hms/open.S newlib/libc/sys/h8300hms/read.S newlib/libc/sys/h8300hms/sbrk.c newlib/libc/sys/h8300hms/setarch.h newlib/libc/sys/h8300hms/stat.S newlib/libc/sys/h8300hms/sys/file.h newlib/libc/sys/h8300hms/sys/syscall.h newlib/libc/sys/h8300hms/syscalls.c newlib/libc/sys/h8300hms/write.S newlib/libc/sys/h8500hms/Makefile.am newlib/libc/sys/h8500hms/Makefile.in newlib/libc/sys/h8500hms/aclocal.m4 newlib/libc/sys/h8500hms/configure newlib/libc/sys/h8500hms/configure.in newlib/libc/sys/h8500hms/crt0.c newlib/libc/sys/h8500hms/misc.c newlib/libc/sys/h8500hms/syscalls.c newlib/libc/sys/linux/Makefile.am newlib/libc/sys/linux/Makefile.in newlib/libc/sys/linux/aclocal.m4 newlib/libc/sys/linux/aio.c newlib/libc/sys/linux/aio64.c newlib/libc/sys/linux/argp/Makefile.am newlib/libc/sys/linux/argp/Makefile.in newlib/libc/sys/linux/argp/argp-ba.c newlib/libc/sys/linux/argp/argp-eexst.c newlib/libc/sys/linux/argp/argp-fmtstream.c newlib/libc/sys/linux/argp/argp-fmtstream.h newlib/libc/sys/linux/argp/argp-fs-xinl.c newlib/libc/sys/linux/argp/argp-help.c newlib/libc/sys/linux/argp/argp-namefrob.h newlib/libc/sys/linux/argp/argp-parse.c newlib/libc/sys/linux/argp/argp-pv.c newlib/libc/sys/linux/argp/argp-pvh.c newlib/libc/sys/linux/argp/argp-xinl.c newlib/libc/sys/linux/bits/initspin.h newlib/libc/sys/linux/bits/libc-lock.h newlib/libc/sys/linux/bits/pthreadtypes.h newlib/libc/sys/linux/bits/typesizes.h newlib/libc/sys/linux/bp-checks.h newlib/libc/sys/linux/brk.c newlib/libc/sys/linux/calloc.c newlib/libc/sys/linux/callocr.c newlib/libc/sys/linux/cfreer.c newlib/libc/sys/linux/cfspeed.c newlib/libc/sys/linux/clock_getres.c newlib/libc/sys/linux/clock_gettime.c newlib/libc/sys/linux/clock_settime.c newlib/libc/sys/linux/cmath/Makefile.am newlib/libc/sys/linux/cmath/Makefile.in newlib/libc/sys/linux/cmath/math_private.h newlib/libc/sys/linux/cmath/s_cacos.c newlib/libc/sys/linux/cmath/s_cacosf.c newlib/libc/sys/linux/cmath/s_cacosh.c newlib/libc/sys/linux/cmath/s_cacoshf.c newlib/libc/sys/linux/cmath/s_cacoshl.c newlib/libc/sys/linux/cmath/s_cacosl.c newlib/libc/sys/linux/cmath/s_casin.c newlib/libc/sys/linux/cmath/s_casinf.c newlib/libc/sys/linux/cmath/s_casinh.c newlib/libc/sys/linux/cmath/s_casinhf.c newlib/libc/sys/linux/cmath/s_casinhl.c newlib/libc/sys/linux/cmath/s_casinl.c newlib/libc/sys/linux/cmath/s_catan.c newlib/libc/sys/linux/cmath/s_catanf.c newlib/libc/sys/linux/cmath/s_catanh.c newlib/libc/sys/linux/cmath/s_catanhf.c newlib/libc/sys/linux/cmath/s_catanhl.c newlib/libc/sys/linux/cmath/s_catanl.c newlib/libc/sys/linux/cmath/s_cbrtl.c newlib/libc/sys/linux/cmath/s_ccos.c newlib/libc/sys/linux/cmath/s_ccosf.c newlib/libc/sys/linux/cmath/s_ccosh.c newlib/libc/sys/linux/cmath/s_ccoshf.c newlib/libc/sys/linux/cmath/s_ccoshl.c newlib/libc/sys/linux/cmath/s_ccosl.c newlib/libc/sys/linux/cmath/s_cexp.c newlib/libc/sys/linux/cmath/s_cexpf.c newlib/libc/sys/linux/cmath/s_cexpl.c newlib/libc/sys/linux/cmath/s_clog.c newlib/libc/sys/linux/cmath/s_clog10.c newlib/libc/sys/linux/cmath/s_clog10f.c newlib/libc/sys/linux/cmath/s_clog10l.c newlib/libc/sys/linux/cmath/s_clogf.c newlib/libc/sys/linux/cmath/s_clogl.c newlib/libc/sys/linux/cmath/s_cpow.c newlib/libc/sys/linux/cmath/s_cpowf.c newlib/libc/sys/linux/cmath/s_cpowl.c newlib/libc/sys/linux/cmath/s_cproj.c newlib/libc/sys/linux/cmath/s_cprojf.c newlib/libc/sys/linux/cmath/s_cprojl.c newlib/libc/sys/linux/cmath/s_csin.c newlib/libc/sys/linux/cmath/s_csinf.c newlib/libc/sys/linux/cmath/s_csinh.c newlib/libc/sys/linux/cmath/s_csinhf.c newlib/libc/sys/linux/cmath/s_csinhl.c newlib/libc/sys/linux/cmath/s_csinl.c newlib/libc/sys/linux/cmath/s_csqrt.c newlib/libc/sys/linux/cmath/s_csqrtf.c newlib/libc/sys/linux/cmath/s_csqrtl.c newlib/libc/sys/linux/cmath/s_ctan.c newlib/libc/sys/linux/cmath/s_ctanf.c newlib/libc/sys/linux/cmath/s_ctanh.c newlib/libc/sys/linux/cmath/s_ctanhf.c newlib/libc/sys/linux/cmath/s_ctanhl.c newlib/libc/sys/linux/cmath/s_ctanl.c newlib/libc/sys/linux/config.h newlib/libc/sys/linux/configure newlib/libc/sys/linux/configure.in newlib/libc/sys/linux/confstr.c newlib/libc/sys/linux/confstr.h newlib/libc/sys/linux/crt1.c newlib/libc/sys/linux/ctermid.c newlib/libc/sys/linux/dl/Makefile.am newlib/libc/sys/linux/dl/Makefile.in newlib/libc/sys/linux/dl/abi-tag.h newlib/libc/sys/linux/dl/atomicity.h newlib/libc/sys/linux/dl/dl-addr.c newlib/libc/sys/linux/dl/dl-cache.c newlib/libc/sys/linux/dl/dl-cache.h newlib/libc/sys/linux/dl/dl-close.c newlib/libc/sys/linux/dl/dl-debug.c newlib/libc/sys/linux/dl/dl-deps.c newlib/libc/sys/linux/dl/dl-dst.h newlib/libc/sys/linux/dl/dl-error.c newlib/libc/sys/linux/dl/dl-fini.c newlib/libc/sys/linux/dl/dl-init.c newlib/libc/sys/linux/dl/dl-iteratephdr.c newlib/libc/sys/linux/dl/dl-libc.c newlib/libc/sys/linux/dl/dl-librecon.h newlib/libc/sys/linux/dl/dl-load.c newlib/libc/sys/linux/dl/dl-local.h newlib/libc/sys/linux/dl/dl-lookup.c newlib/libc/sys/linux/dl/dl-lookupcfg.h newlib/libc/sys/linux/dl/dl-minimal.c newlib/libc/sys/linux/dl/dl-misc.c newlib/libc/sys/linux/dl/dl-object.c newlib/libc/sys/linux/dl/dl-open.c newlib/libc/sys/linux/dl/dl-osinfo.h newlib/libc/sys/linux/dl/dl-profile.c newlib/libc/sys/linux/dl/dl-profstub.c newlib/libc/sys/linux/dl/dl-reloc.c newlib/libc/sys/linux/dl/dl-runtime.c newlib/libc/sys/linux/dl/dl-support.c newlib/libc/sys/linux/dl/dl-sym.c newlib/libc/sys/linux/dl/dl-version.c newlib/libc/sys/linux/dl/do-lookup.h newlib/libc/sys/linux/dl/do-rel.h newlib/libc/sys/linux/dl/dynamic-link.h newlib/libc/sys/linux/dl/kernel-features.h newlib/libc/sys/linux/dl/ldsodefs.h newlib/libc/sys/linux/dl/libintl.h newlib/libc/sys/linux/dl/trusted-dirs.h newlib/libc/sys/linux/dl/unsecvars.h newlib/libc/sys/linux/fclean.c newlib/libc/sys/linux/flockfile.c newlib/libc/sys/linux/fpathconf.c newlib/libc/sys/linux/free.c newlib/libc/sys/linux/freer.c newlib/libc/sys/linux/fstab.c newlib/libc/sys/linux/fstatvfs.c newlib/libc/sys/linux/fstatvfs64.c newlib/libc/sys/linux/ftok.c newlib/libc/sys/linux/ftw.c newlib/libc/sys/linux/ftw64.c newlib/libc/sys/linux/funlockfile.c newlib/libc/sys/linux/getdate.c newlib/libc/sys/linux/getdate_err.c newlib/libc/sys/linux/gethostid.c newlib/libc/sys/linux/gethostname.c newlib/libc/sys/linux/getlogin.c newlib/libc/sys/linux/getopt.c newlib/libc/sys/linux/getopt1.c newlib/libc/sys/linux/getpwent.c newlib/libc/sys/linux/getreent.c newlib/libc/sys/linux/getrlimit64.c newlib/libc/sys/linux/getwd.c newlib/libc/sys/linux/hp-timing.h newlib/libc/sys/linux/iconv/Makefile.am newlib/libc/sys/linux/iconv/Makefile.in newlib/libc/sys/linux/iconv/categories.def newlib/libc/sys/linux/iconv/dummy-repertoire.c newlib/libc/sys/linux/iconv/gconv.c newlib/libc/sys/linux/iconv/gconv_builtin.c newlib/libc/sys/linux/iconv/gconv_builtin.h newlib/libc/sys/linux/iconv/gconv_cache.c newlib/libc/sys/linux/iconv/gconv_charset.h newlib/libc/sys/linux/iconv/gconv_close.c newlib/libc/sys/linux/iconv/gconv_conf.c newlib/libc/sys/linux/iconv/gconv_db.c newlib/libc/sys/linux/iconv/gconv_dl.c newlib/libc/sys/linux/iconv/gconv_int.h newlib/libc/sys/linux/iconv/gconv_open.c newlib/libc/sys/linux/iconv/gconv_simple.c newlib/libc/sys/linux/iconv/gconv_trans.c newlib/libc/sys/linux/iconv/hash-string.h newlib/libc/sys/linux/iconv/iconv.c newlib/libc/sys/linux/iconv/iconv.h newlib/libc/sys/linux/iconv/iconv_charmap.c newlib/libc/sys/linux/iconv/iconv_close.c newlib/libc/sys/linux/iconv/iconv_open.c newlib/libc/sys/linux/iconv/iconvconfig.c newlib/libc/sys/linux/iconv/iconvconfig.h newlib/libc/sys/linux/iconv/loadinfo.h newlib/libc/sys/linux/iconv/localeinfo.h newlib/libc/sys/linux/iconv/loop.c newlib/libc/sys/linux/iconv/skeleton.c newlib/libc/sys/linux/iconv/strtab.c newlib/libc/sys/linux/ids.c newlib/libc/sys/linux/include/argp.h newlib/libc/sys/linux/include/arpa/ftp.h newlib/libc/sys/linux/include/arpa/inet.h newlib/libc/sys/linux/include/arpa/nameser.h newlib/libc/sys/linux/include/arpa/nameser_compat.h newlib/libc/sys/linux/include/arpa/telnet.h newlib/libc/sys/linux/include/arpa/tftp.h newlib/libc/sys/linux/include/bp-sym.h newlib/libc/sys/linux/include/cmathcalls.h newlib/libc/sys/linux/include/complex.h newlib/libc/sys/linux/include/dl-hash.h newlib/libc/sys/linux/include/dlfcn.h newlib/libc/sys/linux/include/fnmatch.h newlib/libc/sys/linux/include/gconv.h newlib/libc/sys/linux/include/getopt.h newlib/libc/sys/linux/include/glob.h newlib/libc/sys/linux/include/hesiod.h newlib/libc/sys/linux/include/iconv.h newlib/libc/sys/linux/include/ifaddrs.h newlib/libc/sys/linux/include/libc_private.h newlib/libc/sys/linux/include/limits.h newlib/libc/sys/linux/include/link.h newlib/libc/sys/linux/include/ltdl.h newlib/libc/sys/linux/include/malloc.h newlib/libc/sys/linux/include/mcheck.h newlib/libc/sys/linux/include/mqueue.h newlib/libc/sys/linux/include/namespace.h newlib/libc/sys/linux/include/net/bpf.h newlib/libc/sys/linux/include/net/bpf_compat.h newlib/libc/sys/linux/include/net/bpfdesc.h newlib/libc/sys/linux/include/net/bridge.h newlib/libc/sys/linux/include/net/ethernet.h newlib/libc/sys/linux/include/net/fddi.h newlib/libc/sys/linux/include/net/if.h newlib/libc/sys/linux/include/net/if_arc.h newlib/libc/sys/linux/include/net/if_arp.h newlib/libc/sys/linux/include/net/if_atm.h newlib/libc/sys/linux/include/net/if_dl.h newlib/libc/sys/linux/include/net/if_gif.h newlib/libc/sys/linux/include/net/if_ieee80211.h newlib/libc/sys/linux/include/net/if_llc.h newlib/libc/sys/linux/include/net/if_media.h newlib/libc/sys/linux/include/net/if_mib.h newlib/libc/sys/linux/include/net/if_ppp.h newlib/libc/sys/linux/include/net/if_pppvar.h newlib/libc/sys/linux/include/net/if_slvar.h newlib/libc/sys/linux/include/net/if_sppp.h newlib/libc/sys/linux/include/net/if_stf.h newlib/libc/sys/linux/include/net/if_tap.h newlib/libc/sys/linux/include/net/if_tapvar.h newlib/libc/sys/linux/include/net/if_tun.h newlib/libc/sys/linux/include/net/if_tunvar.h newlib/libc/sys/linux/include/net/if_types.h newlib/libc/sys/linux/include/net/if_var.h newlib/libc/sys/linux/include/net/if_vlan_var.h newlib/libc/sys/linux/include/net/intrq.h newlib/libc/sys/linux/include/net/iso88025.h newlib/libc/sys/linux/include/net/net_osdep.h newlib/libc/sys/linux/include/net/netisr.h newlib/libc/sys/linux/include/net/pfil.h newlib/libc/sys/linux/include/net/pfkeyv2.h newlib/libc/sys/linux/include/net/ppp_comp.h newlib/libc/sys/linux/include/net/ppp_defs.h newlib/libc/sys/linux/include/net/radix.h newlib/libc/sys/linux/include/net/raw_cb.h newlib/libc/sys/linux/include/net/route.h newlib/libc/sys/linux/include/net/slcompress.h newlib/libc/sys/linux/include/net/slip.h newlib/libc/sys/linux/include/net/zlib.h newlib/libc/sys/linux/include/netconfig.h newlib/libc/sys/linux/include/netdb.h newlib/libc/sys/linux/include/netinet/icmp6.h newlib/libc/sys/linux/include/netinet/icmp_var.h newlib/libc/sys/linux/include/netinet/if_atm.h newlib/libc/sys/linux/include/netinet/if_ether.h newlib/libc/sys/linux/include/netinet/igmp.h newlib/libc/sys/linux/include/netinet/igmp_var.h newlib/libc/sys/linux/include/netinet/in.h newlib/libc/sys/linux/include/netinet/in_gif.h newlib/libc/sys/linux/include/netinet/in_pcb.h newlib/libc/sys/linux/include/netinet/in_systm.h newlib/libc/sys/linux/include/netinet/in_var.h newlib/libc/sys/linux/include/netinet/ip.h newlib/libc/sys/linux/include/netinet/ip6.h newlib/libc/sys/linux/include/netinet/ip_dummynet.h newlib/libc/sys/linux/include/netinet/ip_ecn.h newlib/libc/sys/linux/include/netinet/ip_encap.h newlib/libc/sys/linux/include/netinet/ip_flow.h newlib/libc/sys/linux/include/netinet/ip_fw.h newlib/libc/sys/linux/include/netinet/ip_icmp.h newlib/libc/sys/linux/include/netinet/ip_mroute.h newlib/libc/sys/linux/include/netinet/ip_var.h newlib/libc/sys/linux/include/netinet/ipprotosw.h newlib/libc/sys/linux/include/netinet/tcp.h newlib/libc/sys/linux/include/netinet/tcp_debug.h newlib/libc/sys/linux/include/netinet/tcp_fsm.h newlib/libc/sys/linux/include/netinet/tcp_seq.h newlib/libc/sys/linux/include/netinet/tcp_timer.h newlib/libc/sys/linux/include/netinet/tcp_var.h newlib/libc/sys/linux/include/netinet/tcpip.h newlib/libc/sys/linux/include/netinet/udp.h newlib/libc/sys/linux/include/netinet/udp_var.h newlib/libc/sys/linux/include/netinet6/ah.h newlib/libc/sys/linux/include/netinet6/ah6.h newlib/libc/sys/linux/include/netinet6/esp.h newlib/libc/sys/linux/include/netinet6/esp6.h newlib/libc/sys/linux/include/netinet6/esp_rijndael.h newlib/libc/sys/linux/include/netinet6/icmp6.h newlib/libc/sys/linux/include/netinet6/in6.h newlib/libc/sys/linux/include/netinet6/in6_gif.h newlib/libc/sys/linux/include/netinet6/in6_ifattach.h newlib/libc/sys/linux/include/netinet6/in6_pcb.h newlib/libc/sys/linux/include/netinet6/in6_prefix.h newlib/libc/sys/linux/include/netinet6/in6_var.h newlib/libc/sys/linux/include/netinet6/ip6.h newlib/libc/sys/linux/include/netinet6/ip6_ecn.h newlib/libc/sys/linux/include/netinet6/ip6_fw.h newlib/libc/sys/linux/include/netinet6/ip6_mroute.h newlib/libc/sys/linux/include/netinet6/ip6_var.h newlib/libc/sys/linux/include/netinet6/ip6protosw.h newlib/libc/sys/linux/include/netinet6/ipcomp.h newlib/libc/sys/linux/include/netinet6/ipcomp6.h newlib/libc/sys/linux/include/netinet6/ipsec.h newlib/libc/sys/linux/include/netinet6/ipsec6.h newlib/libc/sys/linux/include/netinet6/mld6_var.h newlib/libc/sys/linux/include/netinet6/nd6.h newlib/libc/sys/linux/include/netinet6/pim6.h newlib/libc/sys/linux/include/netinet6/pim6_var.h newlib/libc/sys/linux/include/netinet6/raw_ip6.h newlib/libc/sys/linux/include/netinet6/scope6_var.h newlib/libc/sys/linux/include/netinet6/tcp6_var.h newlib/libc/sys/linux/include/netinet6/udp6_var.h newlib/libc/sys/linux/include/netns/idp.h newlib/libc/sys/linux/include/netns/idp_var.h newlib/libc/sys/linux/include/netns/ns.h newlib/libc/sys/linux/include/netns/ns_error.h newlib/libc/sys/linux/include/netns/ns_if.h newlib/libc/sys/linux/include/netns/ns_pcb.h newlib/libc/sys/linux/include/netns/sp.h newlib/libc/sys/linux/include/netns/spidp.h newlib/libc/sys/linux/include/netns/spp_debug.h newlib/libc/sys/linux/include/netns/spp_timer.h newlib/libc/sys/linux/include/netns/spp_var.h newlib/libc/sys/linux/include/nsswitch.h newlib/libc/sys/linux/include/paths.h newlib/libc/sys/linux/include/pthread.h newlib/libc/sys/linux/include/regex.h newlib/libc/sys/linux/include/resolv.h newlib/libc/sys/linux/include/rpc/Makefile newlib/libc/sys/linux/include/rpc/auth.h newlib/libc/sys/linux/include/rpc/auth_des.h newlib/libc/sys/linux/include/rpc/auth_kerb.h newlib/libc/sys/linux/include/rpc/auth_unix.h newlib/libc/sys/linux/include/rpc/clnt.h newlib/libc/sys/linux/include/rpc/clnt_soc.h newlib/libc/sys/linux/include/rpc/clnt_stat.h newlib/libc/sys/linux/include/rpc/des.h newlib/libc/sys/linux/include/rpc/des_crypt.h newlib/libc/sys/linux/include/rpc/nettype.h newlib/libc/sys/linux/include/rpc/pmap_clnt.h newlib/libc/sys/linux/include/rpc/pmap_prot.h newlib/libc/sys/linux/include/rpc/pmap_rmt.h newlib/libc/sys/linux/include/rpc/raw.h newlib/libc/sys/linux/include/rpc/rpc.h newlib/libc/sys/linux/include/rpc/rpc_com.h newlib/libc/sys/linux/include/rpc/rpc_msg.h newlib/libc/sys/linux/include/rpc/rpcb_clnt.h newlib/libc/sys/linux/include/rpc/rpcb_prot.h newlib/libc/sys/linux/include/rpc/rpcb_prot.x newlib/libc/sys/linux/include/rpc/rpcent.h newlib/libc/sys/linux/include/rpc/svc.h newlib/libc/sys/linux/include/rpc/svc_auth.h newlib/libc/sys/linux/include/rpc/svc_dg.h newlib/libc/sys/linux/include/rpc/svc_soc.h newlib/libc/sys/linux/include/rpc/types.h newlib/libc/sys/linux/include/rpc/xdr.h newlib/libc/sys/linux/include/rune.h newlib/libc/sys/linux/include/runetype.h newlib/libc/sys/linux/include/sched.h newlib/libc/sys/linux/include/semaphore.h newlib/libc/sys/linux/include/setjmp.h newlib/libc/sys/linux/include/setlocale.h newlib/libc/sys/linux/include/stdint.h newlib/libc/sys/linux/include/time.h newlib/libc/sys/linux/include/un-namespace.h newlib/libc/sys/linux/include/unistd.h newlib/libc/sys/linux/include/wordexp.h newlib/libc/sys/linux/inode.c newlib/libc/sys/linux/internal_statvfs.c newlib/libc/sys/linux/intl/Makefile.am newlib/libc/sys/linux/intl/Makefile.in newlib/libc/sys/linux/intl/bindtextdom.c newlib/libc/sys/linux/intl/catgets.c newlib/libc/sys/linux/intl/catgetsinfo.h newlib/libc/sys/linux/intl/config.h newlib/libc/sys/linux/intl/dcgettext.c newlib/libc/sys/linux/intl/dcigettext.c newlib/libc/sys/linux/intl/dcngettext.c newlib/libc/sys/linux/intl/dgettext.c newlib/libc/sys/linux/intl/dngettext.c newlib/libc/sys/linux/intl/explodename.c newlib/libc/sys/linux/intl/finddomain.c newlib/libc/sys/linux/intl/gettext.c newlib/libc/sys/linux/intl/gettext.h newlib/libc/sys/linux/intl/gettextP.h newlib/libc/sys/linux/intl/hash-string.h newlib/libc/sys/linux/intl/l10nflist.c newlib/libc/sys/linux/intl/lcl_stpcpy.c newlib/libc/sys/linux/intl/loadinfo.h newlib/libc/sys/linux/intl/loadmsgcat.c newlib/libc/sys/linux/intl/locale.alias newlib/libc/sys/linux/intl/localealias.c newlib/libc/sys/linux/intl/ngettext.c newlib/libc/sys/linux/intl/open_catalog.c newlib/libc/sys/linux/intl/plural.c newlib/libc/sys/linux/intl/plural.y newlib/libc/sys/linux/intl/textdomain.c newlib/libc/sys/linux/io.c newlib/libc/sys/linux/io64.c newlib/libc/sys/linux/ipc.c newlib/libc/sys/linux/isatty.c newlib/libc/sys/linux/kernel_sigaction.h newlib/libc/sys/linux/libc-internal.h newlib/libc/sys/linux/libc-symbols.h newlib/libc/sys/linux/libc-tsd.h newlib/libc/sys/linux/libintl.h newlib/libc/sys/linux/linux.c newlib/libc/sys/linux/linux_fsinfo.h newlib/libc/sys/linux/linuxthreads/LICENSE newlib/libc/sys/linux/linuxthreads/Makefile.am newlib/libc/sys/linux/linuxthreads/Makefile.in newlib/libc/sys/linux/linuxthreads/aclocal.m4 newlib/libc/sys/linux/linuxthreads/attr.c newlib/libc/sys/linux/linuxthreads/barrier.c newlib/libc/sys/linux/linuxthreads/bits/initspin.h newlib/libc/sys/linux/linuxthreads/bits/libc-lock.h newlib/libc/sys/linux/linuxthreads/bits/libc-tsd.h newlib/libc/sys/linux/linuxthreads/bits/local_lim.h newlib/libc/sys/linux/linuxthreads/bits/posix_opt.h newlib/libc/sys/linux/linuxthreads/bits/pthreadtypes.h newlib/libc/sys/linux/linuxthreads/bits/sigthread.h newlib/libc/sys/linux/linuxthreads/bp-sym.h newlib/libc/sys/linux/linuxthreads/cancel.c newlib/libc/sys/linux/linuxthreads/condvar.c newlib/libc/sys/linux/linuxthreads/config.h newlib/libc/sys/linux/linuxthreads/configure newlib/libc/sys/linux/linuxthreads/configure.in newlib/libc/sys/linux/linuxthreads/defs.awk newlib/libc/sys/linux/linuxthreads/ecmutex.c newlib/libc/sys/linux/linuxthreads/events.c newlib/libc/sys/linux/linuxthreads/getcpuclockid.c newlib/libc/sys/linux/linuxthreads/getreent.c newlib/libc/sys/linux/linuxthreads/internals.h newlib/libc/sys/linux/linuxthreads/join.c newlib/libc/sys/linux/linuxthreads/joinrace.c newlib/libc/sys/linux/linuxthreads/kernel-features.h newlib/libc/sys/linux/linuxthreads/libc-internal.h newlib/libc/sys/linux/linuxthreads/libc-symbols.h newlib/libc/sys/linux/linuxthreads/linuxthreads.texi newlib/libc/sys/linux/linuxthreads/lockfile.c newlib/libc/sys/linux/linuxthreads/machine/Makefile.am newlib/libc/sys/linux/linuxthreads/machine/Makefile.in newlib/libc/sys/linux/linuxthreads/machine/aclocal.m4 newlib/libc/sys/linux/linuxthreads/machine/configure newlib/libc/sys/linux/linuxthreads/machine/configure.in newlib/libc/sys/linux/linuxthreads/machine/generic/generic-sysdep.h newlib/libc/sys/linux/linuxthreads/machine/i386/Makefile.am newlib/libc/sys/linux/linuxthreads/machine/i386/Makefile.in newlib/libc/sys/linux/linuxthreads/machine/i386/aclocal.m4 newlib/libc/sys/linux/linuxthreads/machine/i386/bp-asm.h newlib/libc/sys/linux/linuxthreads/machine/i386/clone.S newlib/libc/sys/linux/linuxthreads/machine/i386/configure newlib/libc/sys/linux/linuxthreads/machine/i386/configure.in newlib/libc/sys/linux/linuxthreads/machine/i386/i386-sysdep.S newlib/libc/sys/linux/linuxthreads/machine/i386/i386-sysdep.h newlib/libc/sys/linux/linuxthreads/machine/i386/pspinlock.c newlib/libc/sys/linux/linuxthreads/machine/i386/pt-machine.h newlib/libc/sys/linux/linuxthreads/machine/i386/sigcontextinfo.h newlib/libc/sys/linux/linuxthreads/machine/i386/stackinfo.h newlib/libc/sys/linux/linuxthreads/machine/i386/sysdep.S newlib/libc/sys/linux/linuxthreads/machine/i386/sysdep.h newlib/libc/sys/linux/linuxthreads/machine/i386/useldt.h newlib/libc/sys/linux/linuxthreads/manager.c newlib/libc/sys/linux/linuxthreads/mq_notify.c newlib/libc/sys/linux/linuxthreads/mutex.c newlib/libc/sys/linux/linuxthreads/no-tsd.c newlib/libc/sys/linux/linuxthreads/oldsemaphore.c newlib/libc/sys/linux/linuxthreads/posix-timer.h newlib/libc/sys/linux/linuxthreads/prio.c newlib/libc/sys/linux/linuxthreads/proc_service.h newlib/libc/sys/linux/linuxthreads/pt-machine.c newlib/libc/sys/linux/linuxthreads/ptclock_gettime.c newlib/libc/sys/linux/linuxthreads/ptclock_settime.c newlib/libc/sys/linux/linuxthreads/ptfork.c newlib/libc/sys/linux/linuxthreads/pthread.c newlib/libc/sys/linux/linuxthreads/ptlongjmp.c newlib/libc/sys/linux/linuxthreads/queue.h newlib/libc/sys/linux/linuxthreads/reent.c newlib/libc/sys/linux/linuxthreads/reqsyscalls.c newlib/libc/sys/linux/linuxthreads/restart.h newlib/libc/sys/linux/linuxthreads/rwlock.c newlib/libc/sys/linux/linuxthreads/semaphore.c newlib/libc/sys/linux/linuxthreads/semaphore.h newlib/libc/sys/linux/linuxthreads/shlib-compat.h newlib/libc/sys/linux/linuxthreads/signals.c newlib/libc/sys/linux/linuxthreads/specific.c newlib/libc/sys/linux/linuxthreads/spinlock.c newlib/libc/sys/linux/linuxthreads/spinlock.h newlib/libc/sys/linux/linuxthreads/sysctl.c newlib/libc/sys/linux/linuxthreads/td_init.c newlib/libc/sys/linux/linuxthreads/td_log.c newlib/libc/sys/linux/linuxthreads/td_symbol_list.c newlib/libc/sys/linux/linuxthreads/td_ta_clear_event.c newlib/libc/sys/linux/linuxthreads/td_ta_delete.c newlib/libc/sys/linux/linuxthreads/td_ta_enable_stats.c newlib/libc/sys/linux/linuxthreads/td_ta_event_addr.c newlib/libc/sys/linux/linuxthreads/td_ta_event_getmsg.c newlib/libc/sys/linux/linuxthreads/td_ta_get_nthreads.c newlib/libc/sys/linux/linuxthreads/td_ta_get_ph.c newlib/libc/sys/linux/linuxthreads/td_ta_get_stats.c newlib/libc/sys/linux/linuxthreads/td_ta_map_id2thr.c newlib/libc/sys/linux/linuxthreads/td_ta_map_lwp2thr.c newlib/libc/sys/linux/linuxthreads/td_ta_new.c newlib/libc/sys/linux/linuxthreads/td_ta_reset_stats.c newlib/libc/sys/linux/linuxthreads/td_ta_set_event.c newlib/libc/sys/linux/linuxthreads/td_ta_setconcurrency.c newlib/libc/sys/linux/linuxthreads/td_ta_thr_iter.c newlib/libc/sys/linux/linuxthreads/td_ta_tsd_iter.c newlib/libc/sys/linux/linuxthreads/td_thr_clear_event.c newlib/libc/sys/linux/linuxthreads/td_thr_dbresume.c newlib/libc/sys/linux/linuxthreads/td_thr_dbsuspend.c newlib/libc/sys/linux/linuxthreads/td_thr_event_enable.c newlib/libc/sys/linux/linuxthreads/td_thr_event_getmsg.c newlib/libc/sys/linux/linuxthreads/td_thr_get_info.c newlib/libc/sys/linux/linuxthreads/td_thr_getfpregs.c newlib/libc/sys/linux/linuxthreads/td_thr_getgregs.c newlib/libc/sys/linux/linuxthreads/td_thr_getxregs.c newlib/libc/sys/linux/linuxthreads/td_thr_getxregsize.c newlib/libc/sys/linux/linuxthreads/td_thr_set_event.c newlib/libc/sys/linux/linuxthreads/td_thr_setfpregs.c newlib/libc/sys/linux/linuxthreads/td_thr_setgregs.c newlib/libc/sys/linux/linuxthreads/td_thr_setprio.c newlib/libc/sys/linux/linuxthreads/td_thr_setsigpending.c newlib/libc/sys/linux/linuxthreads/td_thr_setxregs.c newlib/libc/sys/linux/linuxthreads/td_thr_sigsetmask.c newlib/libc/sys/linux/linuxthreads/td_thr_tsd.c newlib/libc/sys/linux/linuxthreads/td_thr_validate.c newlib/libc/sys/linux/linuxthreads/testrtsig.h newlib/libc/sys/linux/linuxthreads/thread_db.h newlib/libc/sys/linux/linuxthreads/thread_dbP.h newlib/libc/sys/linux/linuxthreads/timer_create.c newlib/libc/sys/linux/linuxthreads/timer_delete.c newlib/libc/sys/linux/linuxthreads/timer_getoverr.c newlib/libc/sys/linux/linuxthreads/timer_gettime.c newlib/libc/sys/linux/linuxthreads/timer_routines.c newlib/libc/sys/linux/linuxthreads/timer_settime.c newlib/libc/sys/linux/linuxthreads/tst-cancel.c newlib/libc/sys/linux/linuxthreads/tst-context.c newlib/libc/sys/linux/linuxthreads/tststack.c newlib/libc/sys/linux/linuxthreads/unload.c newlib/libc/sys/linux/linuxthreads/weaks.c newlib/libc/sys/linux/linuxthreads/wrapsyscall.c newlib/libc/sys/linux/machine/Makefile.am newlib/libc/sys/linux/machine/Makefile.in newlib/libc/sys/linux/machine/aclocal.m4 newlib/libc/sys/linux/machine/configure newlib/libc/sys/linux/machine/configure.in newlib/libc/sys/linux/machine/hp-timing.h newlib/libc/sys/linux/machine/i386/Makefile.am newlib/libc/sys/linux/machine/i386/Makefile.in newlib/libc/sys/linux/machine/i386/aclocal.m4 newlib/libc/sys/linux/machine/i386/configure newlib/libc/sys/linux/machine/i386/configure.in newlib/libc/sys/linux/machine/i386/crt0.c newlib/libc/sys/linux/machine/i386/dl-machine.h newlib/libc/sys/linux/machine/i386/dl-procinfo.c newlib/libc/sys/linux/machine/i386/dl-procinfo.h newlib/libc/sys/linux/machine/i386/get_clockfreq.c newlib/libc/sys/linux/machine/i386/getpagesize.c newlib/libc/sys/linux/machine/i386/hp-timing.c newlib/libc/sys/linux/machine/i386/hp-timing.h newlib/libc/sys/linux/machine/i386/huge_val.h newlib/libc/sys/linux/machine/i386/i386mach.h newlib/libc/sys/linux/machine/i386/include/endian.h newlib/libc/sys/linux/machine/i386/include/param.h newlib/libc/sys/linux/machine/i386/include/setjmp.h newlib/libc/sys/linux/machine/i386/include/termios.h newlib/libc/sys/linux/machine/i386/setjmp.S newlib/libc/sys/linux/machine/i386/sigaction.c newlib/libc/sys/linux/machine/i386/sigstack.h newlib/libc/sys/linux/machine/i386/socketcall.h newlib/libc/sys/linux/machine/i386/syscall.h newlib/libc/sys/linux/machine/i386/sysdep.h newlib/libc/sys/linux/machine/i386/weakalias.h newlib/libc/sys/linux/malign.c newlib/libc/sys/linux/malignr.c newlib/libc/sys/linux/mallinfor.c newlib/libc/sys/linux/malloc.c newlib/libc/sys/linux/mallocr.c newlib/libc/sys/linux/malloptr.c newlib/libc/sys/linux/mallstatsr.c newlib/libc/sys/linux/mcheck.c newlib/libc/sys/linux/mhooks.h newlib/libc/sys/linux/mmap.c newlib/libc/sys/linux/mntent.c newlib/libc/sys/linux/mntent_r.c newlib/libc/sys/linux/mq_close.c newlib/libc/sys/linux/mq_getattr.c newlib/libc/sys/linux/mq_notify.c newlib/libc/sys/linux/mq_open.c newlib/libc/sys/linux/mq_receive.c newlib/libc/sys/linux/mq_send.c newlib/libc/sys/linux/mq_setattr.c newlib/libc/sys/linux/mq_unlink.c newlib/libc/sys/linux/mqlocal.h newlib/libc/sys/linux/msize.c newlib/libc/sys/linux/msizer.c newlib/libc/sys/linux/mstats.c newlib/libc/sys/linux/mtrim.c newlib/libc/sys/linux/mtrimr.c newlib/libc/sys/linux/net/Makefile.am newlib/libc/sys/linux/net/Makefile.in newlib/libc/sys/linux/net/addr2ascii.3 newlib/libc/sys/linux/net/addr2ascii.c newlib/libc/sys/linux/net/ascii2addr.c newlib/libc/sys/linux/net/base64.c newlib/libc/sys/linux/net/bindresvport.c newlib/libc/sys/linux/net/byteorder.3 newlib/libc/sys/linux/net/ether_addr.c newlib/libc/sys/linux/net/ethers.3 newlib/libc/sys/linux/net/getaddrinfo.3 newlib/libc/sys/linux/net/getaddrinfo.c newlib/libc/sys/linux/net/gethostbydns.c newlib/libc/sys/linux/net/gethostbyht.c newlib/libc/sys/linux/net/gethostbyname.3 newlib/libc/sys/linux/net/gethostbynis.c newlib/libc/sys/linux/net/gethostnamadr.c newlib/libc/sys/linux/net/getifaddrs.3 newlib/libc/sys/linux/net/getifaddrs.c newlib/libc/sys/linux/net/getipnodebyname.3 newlib/libc/sys/linux/net/getnameinfo.3 newlib/libc/sys/linux/net/getnameinfo.c newlib/libc/sys/linux/net/getnetbydns.c newlib/libc/sys/linux/net/getnetbyht.c newlib/libc/sys/linux/net/getnetbynis.c newlib/libc/sys/linux/net/getnetent.3 newlib/libc/sys/linux/net/getnetnamadr.c newlib/libc/sys/linux/net/getproto.c newlib/libc/sys/linux/net/getprotoent.3 newlib/libc/sys/linux/net/getprotoent.c newlib/libc/sys/linux/net/getprotoname.c newlib/libc/sys/linux/net/getservbyname.c newlib/libc/sys/linux/net/getservbyport.c newlib/libc/sys/linux/net/getservent.3 newlib/libc/sys/linux/net/getservent.c newlib/libc/sys/linux/net/herror.c newlib/libc/sys/linux/net/hesiod.3 newlib/libc/sys/linux/net/hesiod.c newlib/libc/sys/linux/net/if_indextoname.3 newlib/libc/sys/linux/net/ifname.c newlib/libc/sys/linux/net/inet.3 newlib/libc/sys/linux/net/inet6_option_space.3 newlib/libc/sys/linux/net/inet6_rthdr_space.3 newlib/libc/sys/linux/net/inet_addr.c newlib/libc/sys/linux/net/inet_lnaof.c newlib/libc/sys/linux/net/inet_makeaddr.c newlib/libc/sys/linux/net/inet_net.3 newlib/libc/sys/linux/net/inet_net_ntop.c newlib/libc/sys/linux/net/inet_net_pton.c newlib/libc/sys/linux/net/inet_neta.c newlib/libc/sys/linux/net/inet_netof.c newlib/libc/sys/linux/net/inet_network.c newlib/libc/sys/linux/net/inet_ntoa.c newlib/libc/sys/linux/net/inet_ntop.c newlib/libc/sys/linux/net/inet_pton.c newlib/libc/sys/linux/net/innetgr-stub.c newlib/libc/sys/linux/net/ip6opt.c newlib/libc/sys/linux/net/iso_addr.3 newlib/libc/sys/linux/net/iso_addr.c newlib/libc/sys/linux/net/issetugid-stub.c newlib/libc/sys/linux/net/linkaddr.3 newlib/libc/sys/linux/net/linkaddr.c newlib/libc/sys/linux/net/map_v4v6.c newlib/libc/sys/linux/net/name6.c newlib/libc/sys/linux/net/namespace.h newlib/libc/sys/linux/net/ns.3 newlib/libc/sys/linux/net/ns_addr.c newlib/libc/sys/linux/net/ns_name.c newlib/libc/sys/linux/net/ns_netint.c newlib/libc/sys/linux/net/ns_ntoa.c newlib/libc/sys/linux/net/ns_parse.c newlib/libc/sys/linux/net/ns_print.c newlib/libc/sys/linux/net/ns_ttl.c newlib/libc/sys/linux/net/nsap_addr.c newlib/libc/sys/linux/net/nsdispatch.3 newlib/libc/sys/linux/net/nsdispatch.c newlib/libc/sys/linux/net/nslexer.c newlib/libc/sys/linux/net/nslexer.l newlib/libc/sys/linux/net/nsparser.c newlib/libc/sys/linux/net/nsparser.h newlib/libc/sys/linux/net/nsparser.y newlib/libc/sys/linux/net/rcmd.3 newlib/libc/sys/linux/net/rcmd.c newlib/libc/sys/linux/net/rcmdsh.3 newlib/libc/sys/linux/net/rcmdsh.c newlib/libc/sys/linux/net/recv.c newlib/libc/sys/linux/net/res_comp.c newlib/libc/sys/linux/net/res_config.h newlib/libc/sys/linux/net/res_data.c newlib/libc/sys/linux/net/res_debug.c newlib/libc/sys/linux/net/res_init.c newlib/libc/sys/linux/net/res_mkquery.c newlib/libc/sys/linux/net/res_mkupdate.c newlib/libc/sys/linux/net/res_query.c newlib/libc/sys/linux/net/res_send.c newlib/libc/sys/linux/net/res_update.c newlib/libc/sys/linux/net/resolver.3 newlib/libc/sys/linux/net/rthdr.c newlib/libc/sys/linux/net/send.c newlib/libc/sys/linux/net/un-namespace.h newlib/libc/sys/linux/net/vars.c newlib/libc/sys/linux/ntp_gettime.c newlib/libc/sys/linux/pathconf.c newlib/libc/sys/linux/pread.c newlib/libc/sys/linux/pread64.c newlib/libc/sys/linux/process.c newlib/libc/sys/linux/prof-freq.c newlib/libc/sys/linux/profile.c newlib/libc/sys/linux/psignal.c newlib/libc/sys/linux/pvallocr.c newlib/libc/sys/linux/pwrite.c newlib/libc/sys/linux/pwrite64.c newlib/libc/sys/linux/raise.c newlib/libc/sys/linux/readdir64.c newlib/libc/sys/linux/realloc.c newlib/libc/sys/linux/reallocr.c newlib/libc/sys/linux/realpath.c newlib/libc/sys/linux/rename.c newlib/libc/sys/linux/resource.c newlib/libc/sys/linux/scandir64.c newlib/libc/sys/linux/sched.c newlib/libc/sys/linux/select.c newlib/libc/sys/linux/seteuid.c newlib/libc/sys/linux/sethostid.c newlib/libc/sys/linux/sethostname.c newlib/libc/sys/linux/setrlimit64.c newlib/libc/sys/linux/shared.ld newlib/libc/sys/linux/shm_open.c newlib/libc/sys/linux/shm_unlink.c newlib/libc/sys/linux/sig.c newlib/libc/sys/linux/sigaction.c newlib/libc/sys/linux/siglongjmp.c newlib/libc/sys/linux/signal.c newlib/libc/sys/linux/sigqueue.c newlib/libc/sys/linux/sigset.c newlib/libc/sys/linux/sigwait.c newlib/libc/sys/linux/sleep.c newlib/libc/sys/linux/socket.c newlib/libc/sys/linux/sockops.h newlib/libc/sys/linux/stack.c newlib/libc/sys/linux/statvfs.c newlib/libc/sys/linux/statvfs64.c newlib/libc/sys/linux/stdlib/COPYRIGHT newlib/libc/sys/linux/stdlib/Makefile.am newlib/libc/sys/linux/stdlib/Makefile.in newlib/libc/sys/linux/stdlib/cclass.h newlib/libc/sys/linux/stdlib/cname.h newlib/libc/sys/linux/stdlib/collate.c newlib/libc/sys/linux/stdlib/collate.h newlib/libc/sys/linux/stdlib/collcmp.c newlib/libc/sys/linux/stdlib/engine.c newlib/libc/sys/linux/stdlib/fnmatch.3 newlib/libc/sys/linux/stdlib/fnmatch.c newlib/libc/sys/linux/stdlib/glob.3 newlib/libc/sys/linux/stdlib/glob.c newlib/libc/sys/linux/stdlib/reallocf.c newlib/libc/sys/linux/stdlib/regcomp.c newlib/libc/sys/linux/stdlib/regerror.c newlib/libc/sys/linux/stdlib/regex.3 newlib/libc/sys/linux/stdlib/regex2.h newlib/libc/sys/linux/stdlib/regexec.c newlib/libc/sys/linux/stdlib/regfree.c newlib/libc/sys/linux/stdlib/utils.h newlib/libc/sys/linux/stdlib/wordexp.c newlib/libc/sys/linux/stdlib/wordfree.c newlib/libc/sys/linux/strsignal.c newlib/libc/sys/linux/strverscmp.c newlib/libc/sys/linux/sys/_types.h newlib/libc/sys/linux/sys/cdefs.h newlib/libc/sys/linux/sys/dirent.h newlib/libc/sys/linux/sys/dlfcn.h newlib/libc/sys/linux/sys/elfclass.h newlib/libc/sys/linux/sys/errno.h newlib/libc/sys/linux/sys/event.h newlib/libc/sys/linux/sys/fcntl.h newlib/libc/sys/linux/sys/features.h newlib/libc/sys/linux/sys/file.h newlib/libc/sys/linux/sys/ioccom.h newlib/libc/sys/linux/sys/ioctl.h newlib/libc/sys/linux/sys/libc-lock.h newlib/libc/sys/linux/sys/libc-tsd.h newlib/libc/sys/linux/sys/link.h newlib/libc/sys/linux/sys/linux_time.h newlib/libc/sys/linux/sys/lock.h newlib/libc/sys/linux/sys/param.h newlib/libc/sys/linux/sys/resource.h newlib/libc/sys/linux/sys/select.h newlib/libc/sys/linux/sys/signal.h newlib/libc/sys/linux/sys/socket.h newlib/libc/sys/linux/sys/sockio.h newlib/libc/sys/linux/sys/stat.h newlib/libc/sys/linux/sys/stdint.h newlib/libc/sys/linux/sys/stdio.h newlib/libc/sys/linux/sys/string.h newlib/libc/sys/linux/sys/termios.h newlib/libc/sys/linux/sys/time.h newlib/libc/sys/linux/sys/types.h newlib/libc/sys/linux/sys/unistd.h newlib/libc/sys/linux/sys/utime.h newlib/libc/sys/linux/sys/utmp.h newlib/libc/sys/linux/sys/utsname.h newlib/libc/sys/linux/sys/wait.h newlib/libc/sys/linux/sysconf.c newlib/libc/sys/linux/sysctl.c newlib/libc/sys/linux/systat.c newlib/libc/sys/linux/system.c newlib/libc/sys/linux/tcdrain.c newlib/libc/sys/linux/tcsendbrk.c newlib/libc/sys/linux/termios.c newlib/libc/sys/linux/thread-m.h newlib/libc/sys/linux/time.c newlib/libc/sys/linux/ttyname_r.c newlib/libc/sys/linux/usleep.c newlib/libc/sys/linux/utimes.c newlib/libc/sys/linux/vallocr.c newlib/libc/sys/linux/versionsort.c newlib/libc/sys/linux/versionsort64.c newlib/libc/sys/linux/wait.c newlib/libc/sys/m88kbug/Makefile.am newlib/libc/sys/m88kbug/Makefile.in newlib/libc/sys/m88kbug/aclocal.m4 newlib/libc/sys/m88kbug/configure newlib/libc/sys/m88kbug/configure.in newlib/libc/sys/m88kbug/crt0.c newlib/libc/sys/m88kbug/sys/systraps.h newlib/libc/sys/m88kbug/syscalls.c newlib/libc/sys/mmixware/Makefile.am newlib/libc/sys/mmixware/Makefile.in newlib/libc/sys/mmixware/_exit.c newlib/libc/sys/mmixware/access.c newlib/libc/sys/mmixware/aclocal.m4 newlib/libc/sys/mmixware/chmod.c newlib/libc/sys/mmixware/chown.c newlib/libc/sys/mmixware/close.c newlib/libc/sys/mmixware/configure newlib/libc/sys/mmixware/configure.in newlib/libc/sys/mmixware/creat.c newlib/libc/sys/mmixware/crt0.c newlib/libc/sys/mmixware/execv.c newlib/libc/sys/mmixware/execve.c newlib/libc/sys/mmixware/fork.c newlib/libc/sys/mmixware/fstat.c newlib/libc/sys/mmixware/getpid.c newlib/libc/sys/mmixware/gettime.c newlib/libc/sys/mmixware/isatty.c newlib/libc/sys/mmixware/kill.c newlib/libc/sys/mmixware/link.c newlib/libc/sys/mmixware/lseek.c newlib/libc/sys/mmixware/open.c newlib/libc/sys/mmixware/pipe.c newlib/libc/sys/mmixware/read.c newlib/libc/sys/mmixware/sbrk.c newlib/libc/sys/mmixware/setjmp.S newlib/libc/sys/mmixware/stat.c newlib/libc/sys/mmixware/sys/syscall.h newlib/libc/sys/mmixware/time.c newlib/libc/sys/mmixware/times.c newlib/libc/sys/mmixware/unlink.c newlib/libc/sys/mmixware/utime.c newlib/libc/sys/mmixware/wait.c newlib/libc/sys/mmixware/write.c newlib/libc/sys/netware/Makefile.am newlib/libc/sys/netware/Makefile.in newlib/libc/sys/netware/aclocal.m4 newlib/libc/sys/netware/configure newlib/libc/sys/netware/configure.in newlib/libc/sys/netware/crt0.c newlib/libc/sys/netware/getpid.c newlib/libc/sys/netware/link.c newlib/libc/sys/rdos/Makefile.am newlib/libc/sys/rdos/Makefile.in newlib/libc/sys/rdos/aclocal.m4 newlib/libc/sys/rdos/chown.c newlib/libc/sys/rdos/close.c newlib/libc/sys/rdos/config.h newlib/libc/sys/rdos/configure newlib/libc/sys/rdos/configure.in newlib/libc/sys/rdos/crt0.S newlib/libc/sys/rdos/execve.c newlib/libc/sys/rdos/fork.c newlib/libc/sys/rdos/fstat.c newlib/libc/sys/rdos/getenv.c newlib/libc/sys/rdos/getpid.c newlib/libc/sys/rdos/gettod.c newlib/libc/sys/rdos/isatty.c newlib/libc/sys/rdos/kill.c newlib/libc/sys/rdos/link.c newlib/libc/sys/rdos/lseek.c newlib/libc/sys/rdos/open.c newlib/libc/sys/rdos/rdos.S newlib/libc/sys/rdos/rdos.h newlib/libc/sys/rdos/rdoshelp.c newlib/libc/sys/rdos/read.c newlib/libc/sys/rdos/readlink.c newlib/libc/sys/rdos/sbrk.c newlib/libc/sys/rdos/stat.c newlib/libc/sys/rdos/symlink.c newlib/libc/sys/rdos/times.c newlib/libc/sys/rdos/unlink.c newlib/libc/sys/rdos/user.def newlib/libc/sys/rdos/wait.c newlib/libc/sys/rdos/write.c newlib/libc/sys/rtems/Makefile.am newlib/libc/sys/rtems/Makefile.in newlib/libc/sys/rtems/aclocal.m4 newlib/libc/sys/rtems/configure newlib/libc/sys/rtems/configure.in newlib/libc/sys/rtems/crt0.c newlib/libc/sys/rtems/dummysys.c newlib/libc/sys/rtems/include/limits.h newlib/libc/sys/rtems/machine/limits.h newlib/libc/sys/rtems/machine/param.h newlib/libc/sys/rtems/sys/dirent.h newlib/libc/sys/rtems/sys/param.h newlib/libc/sys/rtems/sys/queue.h newlib/libc/sys/rtems/sys/syslimits.h newlib/libc/sys/rtems/sys/utime.h newlib/libc/sys/sh/Makefile.am newlib/libc/sys/sh/Makefile.in newlib/libc/sys/sh/aclocal.m4 newlib/libc/sys/sh/configure newlib/libc/sys/sh/configure.in newlib/libc/sys/sh/creat.c newlib/libc/sys/sh/crt0.S newlib/libc/sys/sh/ftruncate.c newlib/libc/sys/sh/sys/syscall.h newlib/libc/sys/sh/syscalls.c newlib/libc/sys/sh/trap.S newlib/libc/sys/sh/truncate.c newlib/libc/sys/sparc64/Makefile.am newlib/libc/sys/sparc64/Makefile.in newlib/libc/sys/sparc64/_exit.S newlib/libc/sys/sparc64/_main.c newlib/libc/sys/sparc64/aclocal.m4 newlib/libc/sys/sparc64/cerror.S newlib/libc/sys/sparc64/closedir.c newlib/libc/sys/sparc64/configure newlib/libc/sys/sparc64/configure.in newlib/libc/sys/sparc64/creat.c newlib/libc/sys/sparc64/crt0.S newlib/libc/sys/sparc64/dup2.S newlib/libc/sys/sparc64/execve.S newlib/libc/sys/sparc64/ieee.c newlib/libc/sys/sparc64/isatty.c newlib/libc/sys/sparc64/lstat.S newlib/libc/sys/sparc64/opendir.c newlib/libc/sys/sparc64/readdir.c newlib/libc/sys/sparc64/rewinddir.c newlib/libc/sys/sparc64/sbrk.S newlib/libc/sys/sparc64/scandir.c newlib/libc/sys/sparc64/seekdir.c newlib/libc/sys/sparc64/sigsetjmp.S newlib/libc/sys/sparc64/stat.S newlib/libc/sys/sparc64/sys/dirent.h newlib/libc/sys/sparc64/sys/fcntl.h newlib/libc/sys/sparc64/sys/file.h newlib/libc/sys/sparc64/sys/stat.h newlib/libc/sys/sparc64/sys/syscall.h newlib/libc/sys/sparc64/sys/syscallasm.h newlib/libc/sys/sparc64/sys/termios.h newlib/libc/sys/sparc64/sys/time.h newlib/libc/sys/sparc64/sys/utime.h newlib/libc/sys/sparc64/sys/utmp.h newlib/libc/sys/sparc64/sys/wait.h newlib/libc/sys/sparc64/telldir.c newlib/libc/sys/sparc64/template.S newlib/libc/sys/sparc64/template_r.S newlib/libc/sys/sparc64/utime.S newlib/libc/sys/sparc64/utime2.c newlib/libc/sys/sparc64/wait.S newlib/libc/sys/sun4/Makefile.am newlib/libc/sys/sun4/Makefile.in newlib/libc/sys/sun4/_main.c newlib/libc/sys/sun4/aclocal.m4 newlib/libc/sys/sun4/configure newlib/libc/sys/sun4/configure.in newlib/libc/sys/sun4/ieee.c newlib/libc/sys/sun4/sys/dirent.h newlib/libc/sys/sun4/sys/file.h newlib/libc/sys/sun4/sys/termios.h newlib/libc/sys/sun4/sys/utime.h newlib/libc/sys/sun4/sys/utmp.h newlib/libc/sys/sun4/sys/wait.h newlib/libc/sys/sysmec/Makefile.am newlib/libc/sys/sysmec/Makefile.in newlib/libc/sys/sysmec/_exit.c newlib/libc/sys/sysmec/access.c newlib/libc/sys/sysmec/aclocal.m4 newlib/libc/sys/sysmec/chmod.c newlib/libc/sys/sysmec/chown.c newlib/libc/sys/sysmec/close.c newlib/libc/sys/sysmec/configure newlib/libc/sys/sysmec/configure.in newlib/libc/sys/sysmec/creat.c newlib/libc/sys/sysmec/crt0.S newlib/libc/sys/sysmec/crt1.c newlib/libc/sys/sysmec/execv.c newlib/libc/sys/sysmec/execve.c newlib/libc/sys/sysmec/fork.c newlib/libc/sys/sysmec/fstat.c newlib/libc/sys/sysmec/getpid.c newlib/libc/sys/sysmec/gettime.c newlib/libc/sys/sysmec/isatty.c newlib/libc/sys/sysmec/kill.c newlib/libc/sys/sysmec/lseek.c newlib/libc/sys/sysmec/open.c newlib/libc/sys/sysmec/pipe.c newlib/libc/sys/sysmec/read.c newlib/libc/sys/sysmec/sbrk.c newlib/libc/sys/sysmec/stat.c newlib/libc/sys/sysmec/sys/syscall.h newlib/libc/sys/sysmec/time.c newlib/libc/sys/sysmec/times.c newlib/libc/sys/sysmec/trap.S newlib/libc/sys/sysmec/unlink.c newlib/libc/sys/sysmec/utime.c newlib/libc/sys/sysmec/wait.c newlib/libc/sys/sysmec/write.c newlib/libc/sys/sysnec810/Makefile.am newlib/libc/sys/sysnec810/Makefile.in newlib/libc/sys/sysnec810/aclocal.m4 newlib/libc/sys/sysnec810/configure newlib/libc/sys/sysnec810/configure.in newlib/libc/sys/sysnec810/crt0.S newlib/libc/sys/sysnec810/io.S newlib/libc/sys/sysnec810/misc.c newlib/libc/sys/sysnec810/sbrk.c newlib/libc/sys/sysnec810/write.c newlib/libc/sys/sysnecv850/Makefile.am newlib/libc/sys/sysnecv850/Makefile.in newlib/libc/sys/sysnecv850/_exit.c newlib/libc/sys/sysnecv850/access.c newlib/libc/sys/sysnecv850/aclocal.m4 newlib/libc/sys/sysnecv850/chmod.c newlib/libc/sys/sysnecv850/chown.c newlib/libc/sys/sysnecv850/close.c newlib/libc/sys/sysnecv850/configure newlib/libc/sys/sysnecv850/configure.in newlib/libc/sys/sysnecv850/creat.c newlib/libc/sys/sysnecv850/crt0.S newlib/libc/sys/sysnecv850/crt1.c newlib/libc/sys/sysnecv850/execv.c newlib/libc/sys/sysnecv850/execve.c newlib/libc/sys/sysnecv850/fork.c newlib/libc/sys/sysnecv850/fstat.c newlib/libc/sys/sysnecv850/getpid.c newlib/libc/sys/sysnecv850/gettime.c newlib/libc/sys/sysnecv850/isatty.c newlib/libc/sys/sysnecv850/kill.c newlib/libc/sys/sysnecv850/link.c newlib/libc/sys/sysnecv850/lseek.c newlib/libc/sys/sysnecv850/open.c newlib/libc/sys/sysnecv850/pipe.c newlib/libc/sys/sysnecv850/read.c newlib/libc/sys/sysnecv850/sbrk.c newlib/libc/sys/sysnecv850/stat.c newlib/libc/sys/sysnecv850/sys/syscall.h newlib/libc/sys/sysnecv850/time.c newlib/libc/sys/sysnecv850/times.c newlib/libc/sys/sysnecv850/trap.S newlib/libc/sys/sysnecv850/unlink.c newlib/libc/sys/sysnecv850/utime.c newlib/libc/sys/sysnecv850/wait.c newlib/libc/sys/sysnecv850/write.c newlib/libc/sys/sysvi386/Makefile.am newlib/libc/sys/sysvi386/Makefile.in newlib/libc/sys/sysvi386/_exit.S newlib/libc/sys/sysvi386/_longjmp.S newlib/libc/sys/sysvi386/_setjmp.S newlib/libc/sys/sysvi386/access.S newlib/libc/sys/sysvi386/aclocal.m4 newlib/libc/sys/sysvi386/alarm.S newlib/libc/sys/sysvi386/brk.S newlib/libc/sys/sysvi386/cerror.S newlib/libc/sys/sysvi386/chdir.S newlib/libc/sys/sysvi386/chmod.S newlib/libc/sys/sysvi386/close.S newlib/libc/sys/sysvi386/closedir.c newlib/libc/sys/sysvi386/configure newlib/libc/sys/sysvi386/configure.in newlib/libc/sys/sysvi386/crt0.c newlib/libc/sys/sysvi386/dup.c newlib/libc/sys/sysvi386/dup2.c newlib/libc/sys/sysvi386/exec.c newlib/libc/sys/sysvi386/execve.S newlib/libc/sys/sysvi386/fcntl.S newlib/libc/sys/sysvi386/fork.S newlib/libc/sys/sysvi386/fpathconf.S newlib/libc/sys/sysvi386/fps.S newlib/libc/sys/sysvi386/fpx.c newlib/libc/sys/sysvi386/fstat.S newlib/libc/sys/sysvi386/getdents.S newlib/libc/sys/sysvi386/getegid.S newlib/libc/sys/sysvi386/geteuid.S newlib/libc/sys/sysvi386/getgid.S newlib/libc/sys/sysvi386/getgroups.S newlib/libc/sys/sysvi386/getpid.S newlib/libc/sys/sysvi386/getuid.S newlib/libc/sys/sysvi386/ioctl.S newlib/libc/sys/sysvi386/isatty.c newlib/libc/sys/sysvi386/kill.S newlib/libc/sys/sysvi386/link.S newlib/libc/sys/sysvi386/lseek.S newlib/libc/sys/sysvi386/mkdir.S newlib/libc/sys/sysvi386/open.S newlib/libc/sys/sysvi386/opendir.c newlib/libc/sys/sysvi386/pathconf.S newlib/libc/sys/sysvi386/pause.S newlib/libc/sys/sysvi386/pipe.S newlib/libc/sys/sysvi386/read.S newlib/libc/sys/sysvi386/readdir.c newlib/libc/sys/sysvi386/rename.S newlib/libc/sys/sysvi386/rewinddir.c newlib/libc/sys/sysvi386/rmdir.S newlib/libc/sys/sysvi386/sbrk.c newlib/libc/sys/sysvi386/scandir.c newlib/libc/sys/sysvi386/seekdir.c newlib/libc/sys/sysvi386/setgid.S newlib/libc/sys/sysvi386/setuid.S newlib/libc/sys/sysvi386/sigaction.S newlib/libc/sys/sysvi386/signal.S newlib/libc/sys/sysvi386/sigprocmask.S newlib/libc/sys/sysvi386/sleep.c newlib/libc/sys/sysvi386/speed.c newlib/libc/sys/sysvi386/stat.S newlib/libc/sys/sysvi386/sys/dirent.h newlib/libc/sys/sysvi386/sys/setjmp.h newlib/libc/sys/sysvi386/sys/termio.h newlib/libc/sys/sysvi386/sys/termios.h newlib/libc/sys/sysvi386/sys/utime.h newlib/libc/sys/sysvi386/sys/utmp.h newlib/libc/sys/sysvi386/sys/wait.h newlib/libc/sys/sysvi386/sysconf.S newlib/libc/sys/sysvi386/tcgetattr.c newlib/libc/sys/sysvi386/tcline.c newlib/libc/sys/sysvi386/tcsetattr.c newlib/libc/sys/sysvi386/telldir.c newlib/libc/sys/sysvi386/time.S newlib/libc/sys/sysvi386/times.S newlib/libc/sys/sysvi386/unlink.S newlib/libc/sys/sysvi386/utime.S newlib/libc/sys/sysvi386/wait.S newlib/libc/sys/sysvi386/waitpid.S newlib/libc/sys/sysvi386/write.S newlib/libc/sys/sysvnecv70/Makefile.am newlib/libc/sys/sysvnecv70/Makefile.in newlib/libc/sys/sysvnecv70/aclocal.m4 newlib/libc/sys/sysvnecv70/cerror.S newlib/libc/sys/sysvnecv70/close.S newlib/libc/sys/sysvnecv70/configure newlib/libc/sys/sysvnecv70/configure.in newlib/libc/sys/sysvnecv70/crt0.S newlib/libc/sys/sysvnecv70/exit.S newlib/libc/sys/sysvnecv70/fps.S newlib/libc/sys/sysvnecv70/fpx.c newlib/libc/sys/sysvnecv70/fstat.S newlib/libc/sys/sysvnecv70/ioctl.S newlib/libc/sys/sysvnecv70/isatty.S newlib/libc/sys/sysvnecv70/lseek.S newlib/libc/sys/sysvnecv70/open.S newlib/libc/sys/sysvnecv70/read.S newlib/libc/sys/sysvnecv70/sbrk.S newlib/libc/sys/sysvnecv70/sysv60.S newlib/libc/sys/sysvnecv70/sysvnecv70.tex newlib/libc/sys/sysvnecv70/write.S newlib/libc/sys/tic80/Makefile.am newlib/libc/sys/tic80/Makefile.in newlib/libc/sys/tic80/aclocal.m4 newlib/libc/sys/tic80/configure newlib/libc/sys/tic80/configure.in newlib/libc/sys/tic80/crt0.c newlib/libc/sys/w65/Makefile.am newlib/libc/sys/w65/Makefile.in newlib/libc/sys/w65/aclocal.m4 newlib/libc/sys/w65/configure newlib/libc/sys/w65/configure.in newlib/libc/sys/w65/crt0.c newlib/libc/sys/w65/sys/syscall.h newlib/libc/sys/w65/syscalls.c newlib/libc/sys/w65/trap.c newlib/libc/sys/z8ksim/Makefile.am newlib/libc/sys/z8ksim/Makefile.in newlib/libc/sys/z8ksim/aclocal.m4 newlib/libc/sys/z8ksim/configure newlib/libc/sys/z8ksim/configure.in newlib/libc/sys/z8ksim/crt0.c newlib/libc/sys/z8ksim/glue.c newlib/libc/sys/z8ksim/sys/syscall.h newlib/libc/syscalls/Makefile.am newlib/libc/syscalls/Makefile.in newlib/libc/syscalls/sysclose.c newlib/libc/syscalls/sysexecve.c newlib/libc/syscalls/sysfcntl.c newlib/libc/syscalls/sysfork.c newlib/libc/syscalls/sysfstat.c newlib/libc/syscalls/sysgetpid.c newlib/libc/syscalls/sysgettod.c newlib/libc/syscalls/sysisatty.c newlib/libc/syscalls/syskill.c newlib/libc/syscalls/syslink.c newlib/libc/syscalls/syslseek.c newlib/libc/syscalls/sysopen.c newlib/libc/syscalls/sysread.c newlib/libc/syscalls/syssbrk.c newlib/libc/syscalls/sysstat.c newlib/libc/syscalls/systimes.c newlib/libc/syscalls/sysunlink.c newlib/libc/syscalls/syswait.c newlib/libc/syscalls/syswrite.c newlib/libc/time/Makefile.am newlib/libc/time/Makefile.in newlib/libc/time/asctime.c newlib/libc/time/asctime_r.c newlib/libc/time/clock.c newlib/libc/time/ctime.c newlib/libc/time/ctime_r.c newlib/libc/time/difftime.c newlib/libc/time/gettzinfo.c newlib/libc/time/gmtime.c newlib/libc/time/gmtime_r.c newlib/libc/time/lcltime.c newlib/libc/time/lcltime_r.c newlib/libc/time/local.h newlib/libc/time/mktime.c newlib/libc/time/mktm_r.c newlib/libc/time/strftime.c newlib/libc/time/strptime.c newlib/libc/time/time.c newlib/libc/time/time.tex newlib/libc/time/tzlock.c newlib/libc/time/tzset.c newlib/libc/time/tzset_r.c newlib/libc/time/tzvars.c newlib/libc/unix/Makefile.am newlib/libc/unix/Makefile.in newlib/libc/unix/basename.c newlib/libc/unix/dirname.c newlib/libc/unix/getcwd.c newlib/libc/unix/getlogin.c newlib/libc/unix/getpass.c newlib/libc/unix/getpwent.c newlib/libc/unix/getut.c newlib/libc/unix/pread.c newlib/libc/unix/pwrite.c newlib/libc/unix/sigset.c newlib/libc/unix/ttyname.c newlib/libm/Makefile.am newlib/libm/Makefile.in newlib/libm/aclocal.m4 newlib/libm/common/Makefile.am newlib/libm/common/Makefile.in newlib/libm/common/fdlibm.h newlib/libm/common/s_cbrt.c newlib/libm/common/s_copysign.c newlib/libm/common/s_exp10.c newlib/libm/common/s_expm1.c newlib/libm/common/s_fdim.c newlib/libm/common/s_finite.c newlib/libm/common/s_fma.c newlib/libm/common/s_fmax.c newlib/libm/common/s_fmin.c newlib/libm/common/s_fpclassify.c newlib/libm/common/s_ilogb.c newlib/libm/common/s_infconst.c newlib/libm/common/s_infinity.c newlib/libm/common/s_isinf.c newlib/libm/common/s_isinfd.c newlib/libm/common/s_isnan.c newlib/libm/common/s_isnand.c newlib/libm/common/s_lib_ver.c newlib/libm/common/s_log1p.c newlib/libm/common/s_logb.c newlib/libm/common/s_lrint.c newlib/libm/common/s_lround.c newlib/libm/common/s_matherr.c newlib/libm/common/s_modf.c newlib/libm/common/s_nan.c newlib/libm/common/s_nearbyint.c newlib/libm/common/s_nextafter.c newlib/libm/common/s_pow10.c newlib/libm/common/s_remquo.c newlib/libm/common/s_rint.c newlib/libm/common/s_round.c newlib/libm/common/s_scalbln.c newlib/libm/common/s_scalbn.c newlib/libm/common/s_signbit.c newlib/libm/common/s_trunc.c newlib/libm/common/sf_cbrt.c newlib/libm/common/sf_copysign.c newlib/libm/common/sf_exp10.c newlib/libm/common/sf_expm1.c newlib/libm/common/sf_fdim.c newlib/libm/common/sf_finite.c newlib/libm/common/sf_fma.c newlib/libm/common/sf_fmax.c newlib/libm/common/sf_fmin.c newlib/libm/common/sf_fpclassify.c newlib/libm/common/sf_ilogb.c newlib/libm/common/sf_infinity.c newlib/libm/common/sf_isinf.c newlib/libm/common/sf_isinff.c newlib/libm/common/sf_isnan.c newlib/libm/common/sf_isnanf.c newlib/libm/common/sf_log1p.c newlib/libm/common/sf_logb.c newlib/libm/common/sf_lrint.c newlib/libm/common/sf_lround.c newlib/libm/common/sf_modf.c newlib/libm/common/sf_nan.c newlib/libm/common/sf_nearbyint.c newlib/libm/common/sf_nextafter.c newlib/libm/common/sf_pow10.c newlib/libm/common/sf_remquo.c newlib/libm/common/sf_rint.c newlib/libm/common/sf_round.c newlib/libm/common/sf_scalbln.c newlib/libm/common/sf_scalbn.c newlib/libm/common/sf_trunc.c newlib/libm/config.h.in newlib/libm/configure newlib/libm/configure.in newlib/libm/libm.texinfo newlib/libm/machine/Makefile.am newlib/libm/machine/Makefile.in newlib/libm/machine/aclocal.m4 newlib/libm/machine/configure newlib/libm/machine/configure.in newlib/libm/machine/i386/Makefile.am newlib/libm/machine/i386/Makefile.in newlib/libm/machine/i386/aclocal.m4 newlib/libm/machine/i386/configure newlib/libm/machine/i386/configure.in newlib/libm/machine/i386/f_atan2.S newlib/libm/machine/i386/f_atan2f.S newlib/libm/machine/i386/f_exp.c newlib/libm/machine/i386/f_expf.c newlib/libm/machine/i386/f_frexp.S newlib/libm/machine/i386/f_frexpf.S newlib/libm/machine/i386/f_ldexp.S newlib/libm/machine/i386/f_ldexpf.S newlib/libm/machine/i386/f_llrint.c newlib/libm/machine/i386/f_llrintf.c newlib/libm/machine/i386/f_llrintl.c newlib/libm/machine/i386/f_log.S newlib/libm/machine/i386/f_log10.S newlib/libm/machine/i386/f_log10f.S newlib/libm/machine/i386/f_logf.S newlib/libm/machine/i386/f_lrint.c newlib/libm/machine/i386/f_lrintf.c newlib/libm/machine/i386/f_lrintl.c newlib/libm/machine/i386/f_math.h newlib/libm/machine/i386/f_pow.c newlib/libm/machine/i386/f_powf.c newlib/libm/machine/i386/f_rint.c newlib/libm/machine/i386/f_rintf.c newlib/libm/machine/i386/f_rintl.c newlib/libm/machine/i386/f_tan.S newlib/libm/machine/i386/f_tanf.S newlib/libm/machine/i386/i386mach.h newlib/libm/machine/spu/Makefile.am newlib/libm/machine/spu/Makefile.in newlib/libm/machine/spu/aclocal.m4 newlib/libm/machine/spu/configure newlib/libm/machine/spu/configure.in newlib/libm/machine/spu/fe_dfl_env.c newlib/libm/machine/spu/feclearexcept.c newlib/libm/machine/spu/fegetenv.c newlib/libm/machine/spu/fegetexceptflag.c newlib/libm/machine/spu/fegetround.c newlib/libm/machine/spu/feholdexcept.c newlib/libm/machine/spu/feraiseexcept.c newlib/libm/machine/spu/fesetenv.c newlib/libm/machine/spu/fesetexceptflag.c newlib/libm/machine/spu/fesetround.c newlib/libm/machine/spu/fetestexcept.c newlib/libm/machine/spu/feupdateenv.c newlib/libm/machine/spu/headers/acos.h newlib/libm/machine/spu/headers/acosd2.h newlib/libm/machine/spu/headers/acosf.h newlib/libm/machine/spu/headers/acosf4.h newlib/libm/machine/spu/headers/acosh.h newlib/libm/machine/spu/headers/acoshd2.h newlib/libm/machine/spu/headers/acoshf.h newlib/libm/machine/spu/headers/acoshf4.h newlib/libm/machine/spu/headers/asin.h newlib/libm/machine/spu/headers/asind2.h newlib/libm/machine/spu/headers/asinf.h newlib/libm/machine/spu/headers/asinf4.h newlib/libm/machine/spu/headers/asinh.h newlib/libm/machine/spu/headers/asinhd2.h newlib/libm/machine/spu/headers/asinhf.h newlib/libm/machine/spu/headers/asinhf4.h newlib/libm/machine/spu/headers/atan.h newlib/libm/machine/spu/headers/atan2.h newlib/libm/machine/spu/headers/atan2d2.h newlib/libm/machine/spu/headers/atan2f.h newlib/libm/machine/spu/headers/atan2f4.h newlib/libm/machine/spu/headers/atand2.h newlib/libm/machine/spu/headers/atanf.h newlib/libm/machine/spu/headers/atanf4.h newlib/libm/machine/spu/headers/atanh.h newlib/libm/machine/spu/headers/atanhd2.h newlib/libm/machine/spu/headers/atanhf.h newlib/libm/machine/spu/headers/atanhf4.h newlib/libm/machine/spu/headers/cbrt.h newlib/libm/machine/spu/headers/cbrtf.h newlib/libm/machine/spu/headers/ceil.h newlib/libm/machine/spu/headers/ceilf.h newlib/libm/machine/spu/headers/copysign.h newlib/libm/machine/spu/headers/copysignf.h newlib/libm/machine/spu/headers/cos.h newlib/libm/machine/spu/headers/cos_sin.h newlib/libm/machine/spu/headers/cosd2.h newlib/libm/machine/spu/headers/cosf.h newlib/libm/machine/spu/headers/cosf4.h newlib/libm/machine/spu/headers/cosh.h newlib/libm/machine/spu/headers/coshd2.h newlib/libm/machine/spu/headers/coshf.h newlib/libm/machine/spu/headers/coshf4.h newlib/libm/machine/spu/headers/divd2.h newlib/libm/machine/spu/headers/divf4.h newlib/libm/machine/spu/headers/dom_chkd_less_than.h newlib/libm/machine/spu/headers/dom_chkd_negone_one.h newlib/libm/machine/spu/headers/dom_chkf_less_than.h newlib/libm/machine/spu/headers/dom_chkf_negone_one.h newlib/libm/machine/spu/headers/erf.h newlib/libm/machine/spu/headers/erf_utils.h newlib/libm/machine/spu/headers/erfc.h newlib/libm/machine/spu/headers/erfcd2.h newlib/libm/machine/spu/headers/erfcf.h newlib/libm/machine/spu/headers/erfcf4.h newlib/libm/machine/spu/headers/erfd2.h newlib/libm/machine/spu/headers/erff.h newlib/libm/machine/spu/headers/erff4.h newlib/libm/machine/spu/headers/exp.h newlib/libm/machine/spu/headers/exp2.h newlib/libm/machine/spu/headers/exp2d2.h newlib/libm/machine/spu/headers/exp2f.h newlib/libm/machine/spu/headers/exp2f4.h newlib/libm/machine/spu/headers/expd2.h newlib/libm/machine/spu/headers/expf.h newlib/libm/machine/spu/headers/expf4.h newlib/libm/machine/spu/headers/expm1.h newlib/libm/machine/spu/headers/expm1d2.h newlib/libm/machine/spu/headers/expm1f.h newlib/libm/machine/spu/headers/expm1f4.h newlib/libm/machine/spu/headers/fabs.h newlib/libm/machine/spu/headers/fabsf.h newlib/libm/machine/spu/headers/fdim.h newlib/libm/machine/spu/headers/fdimf.h newlib/libm/machine/spu/headers/feclearexcept.h newlib/libm/machine/spu/headers/fefpscr.h newlib/libm/machine/spu/headers/fegetenv.h newlib/libm/machine/spu/headers/fegetexceptflag.h newlib/libm/machine/spu/headers/fegetround.h newlib/libm/machine/spu/headers/feholdexcept.h newlib/libm/machine/spu/headers/feraiseexcept.h newlib/libm/machine/spu/headers/fesetenv.h newlib/libm/machine/spu/headers/fesetexceptflag.h newlib/libm/machine/spu/headers/fesetround.h newlib/libm/machine/spu/headers/fetestexcept.h newlib/libm/machine/spu/headers/feupdateenv.h newlib/libm/machine/spu/headers/floor.h newlib/libm/machine/spu/headers/floord2.h newlib/libm/machine/spu/headers/floorf.h newlib/libm/machine/spu/headers/floorf4.h newlib/libm/machine/spu/headers/fma.h newlib/libm/machine/spu/headers/fmaf.h newlib/libm/machine/spu/headers/fmax.h newlib/libm/machine/spu/headers/fmaxf.h newlib/libm/machine/spu/headers/fmin.h newlib/libm/machine/spu/headers/fminf.h newlib/libm/machine/spu/headers/fmod.h newlib/libm/machine/spu/headers/fmodf.h newlib/libm/machine/spu/headers/frexp.h newlib/libm/machine/spu/headers/frexpf.h newlib/libm/machine/spu/headers/hypot.h newlib/libm/machine/spu/headers/hypotd2.h newlib/libm/machine/spu/headers/hypotf.h newlib/libm/machine/spu/headers/hypotf4.h newlib/libm/machine/spu/headers/ilogb.h newlib/libm/machine/spu/headers/ilogbf.h newlib/libm/machine/spu/headers/isnan.h newlib/libm/machine/spu/headers/isnand2.h newlib/libm/machine/spu/headers/isnanf.h newlib/libm/machine/spu/headers/isnanf4.h newlib/libm/machine/spu/headers/ldexp.h newlib/libm/machine/spu/headers/ldexpd2.h newlib/libm/machine/spu/headers/ldexpf.h newlib/libm/machine/spu/headers/ldexpf4.h newlib/libm/machine/spu/headers/lgamma.h newlib/libm/machine/spu/headers/lgammad2.h newlib/libm/machine/spu/headers/lgammaf.h newlib/libm/machine/spu/headers/lgammaf4.h newlib/libm/machine/spu/headers/llrint.h newlib/libm/machine/spu/headers/llrintf.h newlib/libm/machine/spu/headers/llround.h newlib/libm/machine/spu/headers/llroundf.h newlib/libm/machine/spu/headers/log.h newlib/libm/machine/spu/headers/log10.h newlib/libm/machine/spu/headers/log10d2.h newlib/libm/machine/spu/headers/log10f.h newlib/libm/machine/spu/headers/log1p.h newlib/libm/machine/spu/headers/log1pd2.h newlib/libm/machine/spu/headers/log1pf.h newlib/libm/machine/spu/headers/log1pf4.h newlib/libm/machine/spu/headers/log2.h newlib/libm/machine/spu/headers/log2d2.h newlib/libm/machine/spu/headers/log2f.h newlib/libm/machine/spu/headers/log2f4.h newlib/libm/machine/spu/headers/logbf.h newlib/libm/machine/spu/headers/logbf4.h newlib/libm/machine/spu/headers/logd2.h newlib/libm/machine/spu/headers/logf.h newlib/libm/machine/spu/headers/logf4.h newlib/libm/machine/spu/headers/lrint.h newlib/libm/machine/spu/headers/lrintf.h newlib/libm/machine/spu/headers/lround.h newlib/libm/machine/spu/headers/lroundf.h newlib/libm/machine/spu/headers/nearbyint.h newlib/libm/machine/spu/headers/nearbyintf.h newlib/libm/machine/spu/headers/nearbyintf4.h newlib/libm/machine/spu/headers/nextafter.h newlib/libm/machine/spu/headers/nextafterd2.h newlib/libm/machine/spu/headers/nextafterf.h newlib/libm/machine/spu/headers/nextafterf4.h newlib/libm/machine/spu/headers/pow.h newlib/libm/machine/spu/headers/powd2.h newlib/libm/machine/spu/headers/powf.h newlib/libm/machine/spu/headers/powf4.h newlib/libm/machine/spu/headers/recipd2.h newlib/libm/machine/spu/headers/recipf4.h newlib/libm/machine/spu/headers/remainder.h newlib/libm/machine/spu/headers/remainderf.h newlib/libm/machine/spu/headers/remquo.h newlib/libm/machine/spu/headers/remquof.h newlib/libm/machine/spu/headers/rint.h newlib/libm/machine/spu/headers/rintf.h newlib/libm/machine/spu/headers/rintf4.h newlib/libm/machine/spu/headers/round.h newlib/libm/machine/spu/headers/roundf.h newlib/libm/machine/spu/headers/scalbn.h newlib/libm/machine/spu/headers/scalbnf.h newlib/libm/machine/spu/headers/scalbnf4.h newlib/libm/machine/spu/headers/signbit.h newlib/libm/machine/spu/headers/signbitd2.h newlib/libm/machine/spu/headers/simdmath.h newlib/libm/machine/spu/headers/sin.h newlib/libm/machine/spu/headers/sincos.h newlib/libm/machine/spu/headers/sincosd2.h newlib/libm/machine/spu/headers/sincosf.h newlib/libm/machine/spu/headers/sincosf4.h newlib/libm/machine/spu/headers/sind2.h newlib/libm/machine/spu/headers/sinf.h newlib/libm/machine/spu/headers/sinf4.h newlib/libm/machine/spu/headers/sinh.h newlib/libm/machine/spu/headers/sinhd2.h newlib/libm/machine/spu/headers/sinhf.h newlib/libm/machine/spu/headers/sinhf4.h newlib/libm/machine/spu/headers/sqrt.h newlib/libm/machine/spu/headers/sqrtd2.h newlib/libm/machine/spu/headers/sqrtf.h newlib/libm/machine/spu/headers/sqrtf4.h newlib/libm/machine/spu/headers/tan.h newlib/libm/machine/spu/headers/tand2.h newlib/libm/machine/spu/headers/tanf.h newlib/libm/machine/spu/headers/tanf4.h newlib/libm/machine/spu/headers/tanh.h newlib/libm/machine/spu/headers/tanhd2.h newlib/libm/machine/spu/headers/tanhf.h newlib/libm/machine/spu/headers/tanhf4.h newlib/libm/machine/spu/headers/tgamma.h newlib/libm/machine/spu/headers/tgammad2.h newlib/libm/machine/spu/headers/tgammaf.h newlib/libm/machine/spu/headers/tgammaf4.h newlib/libm/machine/spu/headers/trunc.h newlib/libm/machine/spu/headers/truncd2.h newlib/libm/machine/spu/headers/truncf.h newlib/libm/machine/spu/headers/truncf4.h newlib/libm/machine/spu/headers/vec_literal.h newlib/libm/machine/spu/llrint.c newlib/libm/machine/spu/llrintf.c newlib/libm/machine/spu/llround.c newlib/libm/machine/spu/llroundf.c newlib/libm/machine/spu/log2.c newlib/libm/machine/spu/log2f.c newlib/libm/machine/spu/s_asinh.c newlib/libm/machine/spu/s_atan.c newlib/libm/machine/spu/s_cbrt.c newlib/libm/machine/spu/s_ceil.c newlib/libm/machine/spu/s_copysign.c newlib/libm/machine/spu/s_cos.c newlib/libm/machine/spu/s_erf.c newlib/libm/machine/spu/s_expm1.c newlib/libm/machine/spu/s_fabs.c newlib/libm/machine/spu/s_fdim.c newlib/libm/machine/spu/s_floor.c newlib/libm/machine/spu/s_fma.c newlib/libm/machine/spu/s_fmax.c newlib/libm/machine/spu/s_fmin.c newlib/libm/machine/spu/s_frexp.c newlib/libm/machine/spu/s_ilogb.c newlib/libm/machine/spu/s_isnan.c newlib/libm/machine/spu/s_ldexp.c newlib/libm/machine/spu/s_log1p.c newlib/libm/machine/spu/s_lrint.c newlib/libm/machine/spu/s_lround.c newlib/libm/machine/spu/s_nearbyint.c newlib/libm/machine/spu/s_nextafter.c newlib/libm/machine/spu/s_remquo.c newlib/libm/machine/spu/s_rint.c newlib/libm/machine/spu/s_round.c newlib/libm/machine/spu/s_scalbn.c newlib/libm/machine/spu/s_sin.c newlib/libm/machine/spu/s_tan.c newlib/libm/machine/spu/s_tanh.c newlib/libm/machine/spu/s_trunc.c newlib/libm/machine/spu/sf_asinh.c newlib/libm/machine/spu/sf_atan.c newlib/libm/machine/spu/sf_cbrt.c newlib/libm/machine/spu/sf_ceil.c newlib/libm/machine/spu/sf_copysign.c newlib/libm/machine/spu/sf_cos.c newlib/libm/machine/spu/sf_erf.c newlib/libm/machine/spu/sf_expm1.c newlib/libm/machine/spu/sf_fabs.c newlib/libm/machine/spu/sf_fdim.c newlib/libm/machine/spu/sf_finite.c newlib/libm/machine/spu/sf_floor.c newlib/libm/machine/spu/sf_fma.c newlib/libm/machine/spu/sf_fmax.c newlib/libm/machine/spu/sf_fmin.c newlib/libm/machine/spu/sf_fpclassify.c newlib/libm/machine/spu/sf_frexp.c newlib/libm/machine/spu/sf_ilogb.c newlib/libm/machine/spu/sf_isinf.c newlib/libm/machine/spu/sf_isinff.c newlib/libm/machine/spu/sf_isnan.c newlib/libm/machine/spu/sf_isnanf.c newlib/libm/machine/spu/sf_ldexp.c newlib/libm/machine/spu/sf_log1p.c newlib/libm/machine/spu/sf_logb.c newlib/libm/machine/spu/sf_lrint.c newlib/libm/machine/spu/sf_lround.c newlib/libm/machine/spu/sf_nan.c newlib/libm/machine/spu/sf_nearbyint.c newlib/libm/machine/spu/sf_nextafter.c newlib/libm/machine/spu/sf_remquo.c newlib/libm/machine/spu/sf_rint.c newlib/libm/machine/spu/sf_round.c newlib/libm/machine/spu/sf_scalbn.c newlib/libm/machine/spu/sf_sin.c newlib/libm/machine/spu/sf_tan.c newlib/libm/machine/spu/sf_tanh.c newlib/libm/machine/spu/sf_trunc.c newlib/libm/machine/spu/w_acos.c newlib/libm/machine/spu/w_acosh.c newlib/libm/machine/spu/w_asin.c newlib/libm/machine/spu/w_atan2.c newlib/libm/machine/spu/w_atanh.c newlib/libm/machine/spu/w_cosh.c newlib/libm/machine/spu/w_exp.c newlib/libm/machine/spu/w_exp2.c newlib/libm/machine/spu/w_fmod.c newlib/libm/machine/spu/w_hypot.c newlib/libm/machine/spu/w_lgamma.c newlib/libm/machine/spu/w_log.c newlib/libm/machine/spu/w_log10.c newlib/libm/machine/spu/w_pow.c newlib/libm/machine/spu/w_remainder.c newlib/libm/machine/spu/w_sincos.c newlib/libm/machine/spu/w_sinh.c newlib/libm/machine/spu/w_sqrt.c newlib/libm/machine/spu/w_tgamma.c newlib/libm/machine/spu/wf_acos.c newlib/libm/machine/spu/wf_acosh.c newlib/libm/machine/spu/wf_asin.c newlib/libm/machine/spu/wf_atan2.c newlib/libm/machine/spu/wf_atanh.c newlib/libm/machine/spu/wf_cosh.c newlib/libm/machine/spu/wf_exp.c newlib/libm/machine/spu/wf_exp2.c newlib/libm/machine/spu/wf_fmod.c newlib/libm/machine/spu/wf_hypot.c newlib/libm/machine/spu/wf_lgamma.c newlib/libm/machine/spu/wf_log.c newlib/libm/machine/spu/wf_log10.c newlib/libm/machine/spu/wf_pow.c newlib/libm/machine/spu/wf_remainder.c newlib/libm/machine/spu/wf_sincos.c newlib/libm/machine/spu/wf_sinh.c newlib/libm/machine/spu/wf_sqrt.c newlib/libm/machine/spu/wf_tgamma.c newlib/libm/math/Makefile.am newlib/libm/math/Makefile.in newlib/libm/math/e_acos.c newlib/libm/math/e_acosh.c newlib/libm/math/e_asin.c newlib/libm/math/e_atan2.c newlib/libm/math/e_atanh.c newlib/libm/math/e_cosh.c newlib/libm/math/e_exp.c newlib/libm/math/e_fmod.c newlib/libm/math/e_hypot.c newlib/libm/math/e_j0.c newlib/libm/math/e_j1.c newlib/libm/math/e_jn.c newlib/libm/math/e_log.c newlib/libm/math/e_log10.c newlib/libm/math/e_pow.c newlib/libm/math/e_rem_pio2.c newlib/libm/math/e_remainder.c newlib/libm/math/e_scalb.c newlib/libm/math/e_sinh.c newlib/libm/math/e_sqrt.c newlib/libm/math/ef_acos.c newlib/libm/math/ef_acosh.c newlib/libm/math/ef_asin.c newlib/libm/math/ef_atan2.c newlib/libm/math/ef_atanh.c newlib/libm/math/ef_cosh.c newlib/libm/math/ef_exp.c newlib/libm/math/ef_fmod.c newlib/libm/math/ef_hypot.c newlib/libm/math/ef_j0.c newlib/libm/math/ef_j1.c newlib/libm/math/ef_jn.c newlib/libm/math/ef_log.c newlib/libm/math/ef_log10.c newlib/libm/math/ef_pow.c newlib/libm/math/ef_rem_pio2.c newlib/libm/math/ef_remainder.c newlib/libm/math/ef_scalb.c newlib/libm/math/ef_sinh.c newlib/libm/math/ef_sqrt.c newlib/libm/math/er_gamma.c newlib/libm/math/er_lgamma.c newlib/libm/math/erf_gamma.c newlib/libm/math/erf_lgamma.c newlib/libm/math/k_cos.c newlib/libm/math/k_rem_pio2.c newlib/libm/math/k_sin.c newlib/libm/math/k_standard.c newlib/libm/math/k_tan.c newlib/libm/math/kf_cos.c newlib/libm/math/kf_rem_pio2.c newlib/libm/math/kf_sin.c newlib/libm/math/kf_tan.c newlib/libm/math/math.tex newlib/libm/math/s_asinh.c newlib/libm/math/s_atan.c newlib/libm/math/s_ceil.c newlib/libm/math/s_cos.c newlib/libm/math/s_erf.c newlib/libm/math/s_fabs.c newlib/libm/math/s_floor.c newlib/libm/math/s_frexp.c newlib/libm/math/s_ldexp.c newlib/libm/math/s_signif.c newlib/libm/math/s_sin.c newlib/libm/math/s_tan.c newlib/libm/math/s_tanh.c newlib/libm/math/sf_asinh.c newlib/libm/math/sf_atan.c newlib/libm/math/sf_ceil.c newlib/libm/math/sf_cos.c newlib/libm/math/sf_erf.c newlib/libm/math/sf_fabs.c newlib/libm/math/sf_floor.c newlib/libm/math/sf_frexp.c newlib/libm/math/sf_ldexp.c newlib/libm/math/sf_signif.c newlib/libm/math/sf_sin.c newlib/libm/math/sf_tan.c newlib/libm/math/sf_tanh.c newlib/libm/math/w_acos.c newlib/libm/math/w_acosh.c newlib/libm/math/w_asin.c newlib/libm/math/w_atan2.c newlib/libm/math/w_atanh.c newlib/libm/math/w_cabs.c newlib/libm/math/w_cosh.c newlib/libm/math/w_drem.c newlib/libm/math/w_exp.c newlib/libm/math/w_exp2.c newlib/libm/math/w_fmod.c newlib/libm/math/w_gamma.c newlib/libm/math/w_hypot.c newlib/libm/math/w_j0.c newlib/libm/math/w_j1.c newlib/libm/math/w_jn.c newlib/libm/math/w_lgamma.c newlib/libm/math/w_log.c newlib/libm/math/w_log10.c newlib/libm/math/w_pow.c newlib/libm/math/w_remainder.c newlib/libm/math/w_scalb.c newlib/libm/math/w_sincos.c newlib/libm/math/w_sinh.c newlib/libm/math/w_sqrt.c newlib/libm/math/w_tgamma.c newlib/libm/math/wf_acos.c newlib/libm/math/wf_acosh.c newlib/libm/math/wf_asin.c newlib/libm/math/wf_atan2.c newlib/libm/math/wf_atanh.c newlib/libm/math/wf_cabs.c newlib/libm/math/wf_cosh.c newlib/libm/math/wf_drem.c newlib/libm/math/wf_exp.c newlib/libm/math/wf_exp2.c newlib/libm/math/wf_fmod.c newlib/libm/math/wf_gamma.c newlib/libm/math/wf_hypot.c newlib/libm/math/wf_j0.c newlib/libm/math/wf_j1.c newlib/libm/math/wf_jn.c newlib/libm/math/wf_lgamma.c newlib/libm/math/wf_log.c newlib/libm/math/wf_log10.c newlib/libm/math/wf_pow.c newlib/libm/math/wf_remainder.c newlib/libm/math/wf_scalb.c newlib/libm/math/wf_sincos.c newlib/libm/math/wf_sinh.c newlib/libm/math/wf_sqrt.c newlib/libm/math/wf_tgamma.c newlib/libm/math/wr_gamma.c newlib/libm/math/wr_lgamma.c newlib/libm/math/wrf_gamma.c newlib/libm/math/wrf_lgamma.c newlib/libm/mathfp/Makefile.am newlib/libm/mathfp/Makefile.in newlib/libm/mathfp/e_acosh.c newlib/libm/mathfp/e_atanh.c newlib/libm/mathfp/e_hypot.c newlib/libm/mathfp/e_j0.c newlib/libm/mathfp/e_j1.c newlib/libm/mathfp/e_remainder.c newlib/libm/mathfp/e_scalb.c newlib/libm/mathfp/ef_acosh.c newlib/libm/mathfp/ef_atanh.c newlib/libm/mathfp/ef_hypot.c newlib/libm/mathfp/ef_j0.c newlib/libm/mathfp/ef_j1.c newlib/libm/mathfp/ef_remainder.c newlib/libm/mathfp/ef_scalb.c newlib/libm/mathfp/er_gamma.c newlib/libm/mathfp/er_lgamma.c newlib/libm/mathfp/erf_gamma.c newlib/libm/mathfp/erf_lgamma.c newlib/libm/mathfp/mathfp.tex newlib/libm/mathfp/s_acos.c newlib/libm/mathfp/s_asin.c newlib/libm/mathfp/s_asine.c newlib/libm/mathfp/s_asinh.c newlib/libm/mathfp/s_atan.c newlib/libm/mathfp/s_atan2.c newlib/libm/mathfp/s_atangent.c newlib/libm/mathfp/s_ceil.c newlib/libm/mathfp/s_cos.c newlib/libm/mathfp/s_cosh.c newlib/libm/mathfp/s_erf.c newlib/libm/mathfp/s_exp.c newlib/libm/mathfp/s_exp2.c newlib/libm/mathfp/s_fabs.c newlib/libm/mathfp/s_floor.c newlib/libm/mathfp/s_fmod.c newlib/libm/mathfp/s_frexp.c newlib/libm/mathfp/s_ispos.c newlib/libm/mathfp/s_ldexp.c newlib/libm/mathfp/s_log.c newlib/libm/mathfp/s_log10.c newlib/libm/mathfp/s_logarithm.c newlib/libm/mathfp/s_mathcnst.c newlib/libm/mathfp/s_numtest.c newlib/libm/mathfp/s_pow.c newlib/libm/mathfp/s_signif.c newlib/libm/mathfp/s_sin.c newlib/libm/mathfp/s_sincos.c newlib/libm/mathfp/s_sine.c newlib/libm/mathfp/s_sineh.c newlib/libm/mathfp/s_sinf.c newlib/libm/mathfp/s_sinh.c newlib/libm/mathfp/s_sqrt.c newlib/libm/mathfp/s_tan.c newlib/libm/mathfp/s_tanh.c newlib/libm/mathfp/s_tgamma.c newlib/libm/mathfp/sf_acos.c newlib/libm/mathfp/sf_asin.c newlib/libm/mathfp/sf_asine.c newlib/libm/mathfp/sf_asinh.c newlib/libm/mathfp/sf_atan.c newlib/libm/mathfp/sf_atan2.c newlib/libm/mathfp/sf_atangent.c newlib/libm/mathfp/sf_ceil.c newlib/libm/mathfp/sf_cos.c newlib/libm/mathfp/sf_cosh.c newlib/libm/mathfp/sf_erf.c newlib/libm/mathfp/sf_exp.c newlib/libm/mathfp/sf_exp2.c newlib/libm/mathfp/sf_fabs.c newlib/libm/mathfp/sf_floor.c newlib/libm/mathfp/sf_fmod.c newlib/libm/mathfp/sf_frexp.c newlib/libm/mathfp/sf_ispos.c newlib/libm/mathfp/sf_ldexp.c newlib/libm/mathfp/sf_log.c newlib/libm/mathfp/sf_log10.c newlib/libm/mathfp/sf_logarithm.c newlib/libm/mathfp/sf_numtest.c newlib/libm/mathfp/sf_pow.c newlib/libm/mathfp/sf_signif.c newlib/libm/mathfp/sf_sin.c newlib/libm/mathfp/sf_sincos.c newlib/libm/mathfp/sf_sine.c newlib/libm/mathfp/sf_sineh.c newlib/libm/mathfp/sf_sinh.c newlib/libm/mathfp/sf_sqrt.c newlib/libm/mathfp/sf_tan.c newlib/libm/mathfp/sf_tanh.c newlib/libm/mathfp/sf_tgamma.c newlib/libm/mathfp/w_cabs.c newlib/libm/mathfp/w_drem.c newlib/libm/mathfp/w_jn.c newlib/libm/mathfp/wf_cabs.c newlib/libm/mathfp/wf_drem.c newlib/libm/mathfp/wf_jn.c newlib/libm/mathfp/zmath.h newlib/libm/test/Makefile.in newlib/libm/test/acos_vec.c newlib/libm/test/acosf_vec.c newlib/libm/test/acosh_vec.c newlib/libm/test/acoshf_vec.c newlib/libm/test/asin_vec.c newlib/libm/test/asinf_vec.c newlib/libm/test/asinh_vec.c newlib/libm/test/asinhf_vec.c newlib/libm/test/atan2_vec.c newlib/libm/test/atan2f_vec.c newlib/libm/test/atan_vec.c newlib/libm/test/atanf_vec.c newlib/libm/test/atanh_vec.c newlib/libm/test/atanhf_vec.c newlib/libm/test/ceil_vec.c newlib/libm/test/ceilf_vec.c newlib/libm/test/conv_vec.c newlib/libm/test/convert.c newlib/libm/test/cos_vec.c newlib/libm/test/cosf_vec.c newlib/libm/test/cosh_vec.c newlib/libm/test/coshf_vec.c newlib/libm/test/dcvt.c newlib/libm/test/dvec.c newlib/libm/test/erf_vec.c newlib/libm/test/erfc_vec.c newlib/libm/test/erfcf_vec.c newlib/libm/test/erff_vec.c newlib/libm/test/exp_vec.c newlib/libm/test/expf_vec.c newlib/libm/test/fabs_vec.c newlib/libm/test/fabsf_vec.c newlib/libm/test/floor_vec.c newlib/libm/test/floorf_vec.c newlib/libm/test/fmod_vec.c newlib/libm/test/fmodf_vec.c newlib/libm/test/gamma_vec.c newlib/libm/test/gammaf_vec.c newlib/libm/test/hypot_vec.c newlib/libm/test/hypotf_vec.c newlib/libm/test/iconv_vec.c newlib/libm/test/j0_vec.c newlib/libm/test/j0f_vec.c newlib/libm/test/j1_vec.c newlib/libm/test/j1f_vec.c newlib/libm/test/jn_vec.c newlib/libm/test/jnf_vec.c newlib/libm/test/log10_vec.c newlib/libm/test/log10f_vec.c newlib/libm/test/log1p_vec.c newlib/libm/test/log1pf_vec.c newlib/libm/test/log2_vec.c newlib/libm/test/log2f_vec.c newlib/libm/test/log_vec.c newlib/libm/test/logf_vec.c newlib/libm/test/math.c newlib/libm/test/math2.c newlib/libm/test/sin_vec.c newlib/libm/test/sinf_vec.c newlib/libm/test/sinh_vec.c newlib/libm/test/sinhf_vec.c newlib/libm/test/sprint_ivec.c newlib/libm/test/sprint_vec.c newlib/libm/test/sqrt_vec.c newlib/libm/test/sqrtf_vec.c newlib/libm/test/string.c newlib/libm/test/tan_vec.c newlib/libm/test/tanf_vec.c newlib/libm/test/tanh_vec.c newlib/libm/test/tanhf_vec.c newlib/libm/test/test.c newlib/libm/test/test.h newlib/libm/test/test_ieee.c newlib/libm/test/test_is.c newlib/libm/test/y0_vec.c newlib/libm/test/y0f_vec.c newlib/libm/test/y1_vec.c newlib/libm/test/y1f_vec.c newlib/libm/test/yn_vec.c newlib/libm/test/ynf_vec.c newlib/newlib.hin newlib/stamp-h.in newlib/testsuite/config/default.exp newlib/testsuite/include/check.h newlib/testsuite/lib/checkoutput.exp newlib/testsuite/lib/flags.exp newlib/testsuite/lib/newlib.exp newlib/testsuite/lib/passfail.exp newlib/testsuite/newlib.elix/elix.exp newlib/testsuite/newlib.elix/tmmap.c newlib/testsuite/newlib.iconv/iconv.exp newlib/testsuite/newlib.iconv/iconvjp.c newlib/testsuite/newlib.iconv/iconvnm.c newlib/testsuite/newlib.iconv/iconvru.c newlib/testsuite/newlib.locale/UTF-8.c newlib/testsuite/newlib.locale/UTF-8.exp newlib/testsuite/newlib.locale/locale.exp newlib/testsuite/newlib.search/hsearchtest.c newlib/testsuite/newlib.search/hsearchtest.exp newlib/testsuite/newlib.stdlib/atexit.c newlib/testsuite/newlib.stdlib/atexit.exp newlib/testsuite/newlib.string/memmove1.c newlib/testsuite/newlib.string/string.exp newlib/testsuite/newlib.string/tstring.c newlib/testsuite/newlib.wctype/tiswctype.c newlib/testsuite/newlib.wctype/twctrans.c newlib/testsuite/newlib.wctype/twctype.c newlib/testsuite/newlib.wctype/wctype.exp winsup/COPYING winsup/CYGWIN_LICENSE winsup/ChangeLog winsup/Makefile.common winsup/Makefile.in winsup/README winsup/acinclude.m4 winsup/aclocal.m4 winsup/configure winsup/configure.in winsup/cygserver/ChangeLog winsup/cygserver/Makefile.in winsup/cygserver/README winsup/cygserver/aclocal.m4 winsup/cygserver/bsd_helper.cc winsup/cygserver/bsd_helper.h winsup/cygserver/bsd_log.cc winsup/cygserver/bsd_log.h winsup/cygserver/bsd_mutex.cc winsup/cygserver/bsd_mutex.h winsup/cygserver/client.cc winsup/cygserver/configure winsup/cygserver/configure.in winsup/cygserver/cygserver-config winsup/cygserver/cygserver.cc winsup/cygserver/cygserver.conf winsup/cygserver/msg.cc winsup/cygserver/process.cc winsup/cygserver/process.h winsup/cygserver/sem.cc winsup/cygserver/shm.cc winsup/cygserver/sysv_msg.cc winsup/cygserver/sysv_sem.cc winsup/cygserver/sysv_shm.cc winsup/cygserver/threaded_queue.cc winsup/cygserver/threaded_queue.h winsup/cygserver/transport.cc winsup/cygserver/transport.h winsup/cygserver/transport_pipes.cc winsup/cygserver/transport_pipes.h winsup/cygserver/woutsup.h winsup/cygwin/CYGWIN_LICENSE winsup/cygwin/ChangeLog winsup/cygwin/ChangeLog-1995 winsup/cygwin/ChangeLog-1996 winsup/cygwin/ChangeLog-1997 winsup/cygwin/ChangeLog-1998 winsup/cygwin/ChangeLog-1999 winsup/cygwin/ChangeLog-2000 winsup/cygwin/ChangeLog-2001 winsup/cygwin/ChangeLog-2002 winsup/cygwin/ChangeLog-2003 winsup/cygwin/ChangeLog-2004 winsup/cygwin/ChangeLog-2005 winsup/cygwin/ChangeLog-2006 winsup/cygwin/ChangeLog-2007 winsup/cygwin/Makefile.in winsup/cygwin/ROADMAP winsup/cygwin/acconfig.h winsup/cygwin/aclocal.m4 winsup/cygwin/analyze_sigfe winsup/cygwin/assert.cc winsup/cygwin/autoload.cc winsup/cygwin/automode.c winsup/cygwin/binmode.c winsup/cygwin/child_info.h winsup/cygwin/config.h.in winsup/cygwin/config/i386/profile.h winsup/cygwin/configure winsup/cygwin/configure.in winsup/cygwin/cpuid.h winsup/cygwin/crt0.c winsup/cygwin/ctype.cc winsup/cygwin/cxx.cc winsup/cygwin/cygerrno.h winsup/cygwin/cygheap.cc winsup/cygwin/cygheap.h winsup/cygwin/cyglsa.h winsup/cygwin/cygmagic winsup/cygwin/cygmalloc.h winsup/cygwin/cygserver.h winsup/cygwin/cygserver_ipc.h winsup/cygwin/cygserver_msg.h winsup/cygwin/cygserver_sem.h winsup/cygwin/cygserver_shm.h winsup/cygwin/cygthread.cc winsup/cygwin/cygthread.h winsup/cygwin/cygtls.cc winsup/cygwin/cygtls.h winsup/cygwin/cygwin-shilka winsup/cygwin/cygwin.din winsup/cygwin/cygwin.sc winsup/cygwin/cygwin_version.h winsup/cygwin/dcrt0.cc winsup/cygwin/debug.cc winsup/cygwin/debug.h winsup/cygwin/devices.cc winsup/cygwin/devices.h winsup/cygwin/devices.in winsup/cygwin/dir.cc winsup/cygwin/dlfcn.cc winsup/cygwin/dll_init.cc winsup/cygwin/dll_init.h winsup/cygwin/dll_init.sgml winsup/cygwin/dllfixdbg winsup/cygwin/dlmalloc.c winsup/cygwin/dlmalloc.h winsup/cygwin/dtable.cc winsup/cygwin/dtable.h winsup/cygwin/dtable.sgml winsup/cygwin/environ.cc winsup/cygwin/environ.h winsup/cygwin/errno.cc winsup/cygwin/exceptions.cc winsup/cygwin/exec.cc winsup/cygwin/external.cc winsup/cygwin/external.sgml winsup/cygwin/fcntl.cc winsup/cygwin/fhandler.cc winsup/cygwin/fhandler.h winsup/cygwin/fhandler_clipboard.cc winsup/cygwin/fhandler_console.cc winsup/cygwin/fhandler_disk_file.cc winsup/cygwin/fhandler_dsp.cc winsup/cygwin/fhandler_fifo.cc winsup/cygwin/fhandler_floppy.cc winsup/cygwin/fhandler_mailslot.cc winsup/cygwin/fhandler_mem.cc winsup/cygwin/fhandler_netdrive.cc winsup/cygwin/fhandler_nodevice.cc winsup/cygwin/fhandler_proc.cc winsup/cygwin/fhandler_process.cc winsup/cygwin/fhandler_procnet.cc winsup/cygwin/fhandler_random.cc winsup/cygwin/fhandler_raw.cc winsup/cygwin/fhandler_registry.cc winsup/cygwin/fhandler_serial.cc winsup/cygwin/fhandler_socket.cc winsup/cygwin/fhandler_tape.cc winsup/cygwin/fhandler_termios.cc winsup/cygwin/fhandler_tty.cc winsup/cygwin/fhandler_virtual.cc winsup/cygwin/fhandler_windows.cc winsup/cygwin/fhandler_zero.cc winsup/cygwin/flock.cc winsup/cygwin/fork.cc winsup/cygwin/gcrt0.c winsup/cygwin/gendef winsup/cygwin/gendevices winsup/cygwin/gentls_offsets winsup/cygwin/glob.cc winsup/cygwin/gmon.c winsup/cygwin/gmon.h winsup/cygwin/grp.cc winsup/cygwin/heap.cc winsup/cygwin/heap.h winsup/cygwin/hires.h winsup/cygwin/hookapi.cc winsup/cygwin/how-autoload-works.txt winsup/cygwin/how-cygheap-works.txt winsup/cygwin/how-cygtls-works.txt winsup/cygwin/how-fhandlers-work.txt winsup/cygwin/how-signals-work.txt winsup/cygwin/how-spawn-works.txt winsup/cygwin/how-to-debug-cygwin.txt winsup/cygwin/how-vfork-works.txt winsup/cygwin/include/a.out.h winsup/cygwin/include/arpa/ftp.h winsup/cygwin/include/arpa/inet.h winsup/cygwin/include/arpa/nameser.h winsup/cygwin/include/arpa/nameser_compat.h winsup/cygwin/include/arpa/telnet.h winsup/cygwin/include/asm/byteorder.h winsup/cygwin/include/asm/socket.h winsup/cygwin/include/asm/types.h winsup/cygwin/include/attr/xattr.h winsup/cygwin/include/byteswap.h winsup/cygwin/include/ctype.h winsup/cygwin/include/cygwin/_types.h winsup/cygwin/include/cygwin/acl.h winsup/cygwin/include/cygwin/config.h winsup/cygwin/include/cygwin/core_dump.h winsup/cygwin/include/cygwin/cygwin_dll.h winsup/cygwin/include/cygwin/fs.h winsup/cygwin/include/cygwin/grp.h winsup/cygwin/include/cygwin/hdreg.h winsup/cygwin/include/cygwin/icmp.h winsup/cygwin/include/cygwin/if.h winsup/cygwin/include/cygwin/in.h winsup/cygwin/include/cygwin/in6.h winsup/cygwin/include/cygwin/in_systm.h winsup/cygwin/include/cygwin/ipc.h winsup/cygwin/include/cygwin/kd.h winsup/cygwin/include/cygwin/msg.h winsup/cygwin/include/cygwin/mtio.h winsup/cygwin/include/cygwin/rdevio.h winsup/cygwin/include/cygwin/sem.h winsup/cygwin/include/cygwin/shm.h winsup/cygwin/include/cygwin/signal.h winsup/cygwin/include/cygwin/socket.h winsup/cygwin/include/cygwin/sockios.h winsup/cygwin/include/cygwin/stat.h winsup/cygwin/include/cygwin/stdlib.h winsup/cygwin/include/cygwin/sys_time.h winsup/cygwin/include/cygwin/sysproto.h winsup/cygwin/include/cygwin/time.h winsup/cygwin/include/cygwin/types.h winsup/cygwin/include/cygwin/utmp.h winsup/cygwin/include/cygwin/version.h winsup/cygwin/include/cygwin/wait.h winsup/cygwin/include/dlfcn.h winsup/cygwin/include/elf.h winsup/cygwin/include/endian.h winsup/cygwin/include/err.h winsup/cygwin/include/exceptions.h winsup/cygwin/include/fcntl.h winsup/cygwin/include/features.h winsup/cygwin/include/fnmatch.h winsup/cygwin/include/fts.h winsup/cygwin/include/ftw.h winsup/cygwin/include/getopt.h winsup/cygwin/include/glob.h winsup/cygwin/include/icmp.h winsup/cygwin/include/ifaddrs.h winsup/cygwin/include/inttypes.h winsup/cygwin/include/io.h winsup/cygwin/include/lastlog.h winsup/cygwin/include/libgen.h winsup/cygwin/include/limits.h winsup/cygwin/include/machine/stdlib.h winsup/cygwin/include/mapi.h winsup/cygwin/include/memory.h winsup/cygwin/include/mntent.h winsup/cygwin/include/mqueue.h winsup/cygwin/include/net/if.h winsup/cygwin/include/netdb.h winsup/cygwin/include/netinet/in.h winsup/cygwin/include/netinet/in_systm.h winsup/cygwin/include/netinet/ip.h winsup/cygwin/include/netinet/ip_icmp.h winsup/cygwin/include/netinet/tcp.h winsup/cygwin/include/netinet/udp.h winsup/cygwin/include/paths.h winsup/cygwin/include/poll.h winsup/cygwin/include/pthread.h winsup/cygwin/include/pty.h winsup/cygwin/include/resolv.h winsup/cygwin/include/sched.h winsup/cygwin/include/search.h winsup/cygwin/include/semaphore.h winsup/cygwin/include/stdint.h winsup/cygwin/include/strings.h winsup/cygwin/include/sys/acl.h winsup/cygwin/include/sys/copying.dj winsup/cygwin/include/sys/cygwin.h winsup/cygwin/include/sys/dirent.h winsup/cygwin/include/sys/elf32.h winsup/cygwin/include/sys/elf64.h winsup/cygwin/include/sys/elf_common.h winsup/cygwin/include/sys/elf_generic.h winsup/cygwin/include/sys/file.h winsup/cygwin/include/sys/ioctl.h winsup/cygwin/include/sys/ipc.h winsup/cygwin/include/sys/kd.h winsup/cygwin/include/sys/lock.h winsup/cygwin/include/sys/mman.h winsup/cygwin/include/sys/mount.h winsup/cygwin/include/sys/msg.h winsup/cygwin/include/sys/mtio.h winsup/cygwin/include/sys/param.h winsup/cygwin/include/sys/poll.h winsup/cygwin/include/sys/procfs.h winsup/cygwin/include/sys/queue.h winsup/cygwin/include/sys/resource.h winsup/cygwin/include/sys/select.h winsup/cygwin/include/sys/sem.h winsup/cygwin/include/sys/shm.h winsup/cygwin/include/sys/smallprint.h winsup/cygwin/include/sys/socket.h winsup/cygwin/include/sys/soundcard.h winsup/cygwin/include/sys/statfs.h winsup/cygwin/include/sys/statvfs.h winsup/cygwin/include/sys/stdio.h winsup/cygwin/include/sys/strace.h winsup/cygwin/include/sys/syslimits.h winsup/cygwin/include/sys/syslog.h winsup/cygwin/include/sys/sysmacros.h winsup/cygwin/include/sys/sysproto.h winsup/cygwin/include/sys/termio.h winsup/cygwin/include/sys/termios.h winsup/cygwin/include/sys/ttychars.h winsup/cygwin/include/sys/uio.h winsup/cygwin/include/sys/un.h winsup/cygwin/include/sys/utime.h winsup/cygwin/include/sys/utmp.h winsup/cygwin/include/sys/utsname.h winsup/cygwin/include/sys/vfs.h winsup/cygwin/include/sys/wait.h winsup/cygwin/include/sysexits.h winsup/cygwin/include/syslog.h winsup/cygwin/include/termio.h winsup/cygwin/include/tzfile.h winsup/cygwin/include/utmpx.h winsup/cygwin/init.cc winsup/cygwin/ioctl.cc winsup/cygwin/ipc.cc winsup/cygwin/lib/_cygwin_crt0_common.cc winsup/cygwin/lib/crt0.h winsup/cygwin/lib/cygwin_attach_dll.c winsup/cygwin/lib/cygwin_crt0.c winsup/cygwin/lib/dll_entry.c winsup/cygwin/lib/dll_main.cc winsup/cygwin/lib/libcmain.c winsup/cygwin/lib/premain0.c winsup/cygwin/lib/premain1.c winsup/cygwin/lib/premain2.c winsup/cygwin/lib/premain3.c winsup/cygwin/lib/pseudo-reloc.c winsup/cygwin/libc/bsdlib.cc winsup/cygwin/libc/fnmatch.c winsup/cygwin/libc/fts.c winsup/cygwin/libc/ftw.c winsup/cygwin/libc/getopt.c winsup/cygwin/libc/inet_addr.c winsup/cygwin/libc/inet_network.c winsup/cygwin/libc/minires-os-if.c winsup/cygwin/libc/minires.c winsup/cygwin/libc/minires.h winsup/cygwin/libc/nftw.c winsup/cygwin/libc/rcmd.cc winsup/cygwin/libc/rexec.cc winsup/cygwin/libc/strptime.cc winsup/cygwin/libc/timelocal.cc winsup/cygwin/libc/timelocal.h winsup/cygwin/libc/xsique.cc winsup/cygwin/localtime.cc winsup/cygwin/lsearch.cc winsup/cygwin/malloc.cc winsup/cygwin/malloc_wrapper.cc winsup/cygwin/mcount.c winsup/cygwin/miscfuncs.cc winsup/cygwin/mktemp.cc winsup/cygwin/mkvers.sh winsup/cygwin/mmap.cc winsup/cygwin/mmap_helper.h winsup/cygwin/msg.cc winsup/cygwin/mtinfo.h winsup/cygwin/net.cc winsup/cygwin/netdb.cc winsup/cygwin/newsym winsup/cygwin/ntdll.h winsup/cygwin/ntea.cc winsup/cygwin/passwd.cc winsup/cygwin/path.cc winsup/cygwin/path.h winsup/cygwin/path.sgml winsup/cygwin/perprocess.h winsup/cygwin/pinfo.cc winsup/cygwin/pinfo.h winsup/cygwin/pipe.cc winsup/cygwin/poll.cc winsup/cygwin/posix.sgml winsup/cygwin/posix_ipc.cc winsup/cygwin/profil.c winsup/cygwin/profil.h winsup/cygwin/pseudo-reloc.cc winsup/cygwin/pthread.cc winsup/cygwin/pwdgrp.h winsup/cygwin/random.cc winsup/cygwin/regex/COPYRIGHT winsup/cygwin/regex/cclass.h winsup/cygwin/regex/cname.h winsup/cygwin/regex/engine.c winsup/cygwin/regex/engine.ih winsup/cygwin/regex/mkh winsup/cygwin/regex/regcomp.c winsup/cygwin/regex/regcomp.ih winsup/cygwin/regex/regerror.c winsup/cygwin/regex/regerror.ih winsup/cygwin/regex/regex.3 winsup/cygwin/regex/regex.7 winsup/cygwin/regex/regex.h winsup/cygwin/regex/regex2.h winsup/cygwin/regex/regexec.c winsup/cygwin/regex/regfree.c winsup/cygwin/regex/tests winsup/cygwin/regex/utils.h winsup/cygwin/regexp/COPYRIGHT winsup/cygwin/regexp/README winsup/cygwin/regexp/regexp.h winsup/cygwin/regexp/regmagic.h winsup/cygwin/regexp/v8_regerror.c winsup/cygwin/regexp/v8_regexp.c winsup/cygwin/regexp/v8_regsub.c winsup/cygwin/registry.cc winsup/cygwin/registry.h winsup/cygwin/resource.cc winsup/cygwin/rmsym winsup/cygwin/scandir.cc winsup/cygwin/sched.cc winsup/cygwin/sec_acl.cc winsup/cygwin/sec_auth.cc winsup/cygwin/sec_helper.cc winsup/cygwin/security.cc winsup/cygwin/security.h winsup/cygwin/select.cc winsup/cygwin/sem.cc winsup/cygwin/shared.cc winsup/cygwin/shared.sgml winsup/cygwin/shared_info.h winsup/cygwin/shm.cc winsup/cygwin/signal.cc winsup/cygwin/sigproc.cc winsup/cygwin/sigproc.h winsup/cygwin/smallprint.cc winsup/cygwin/sortdin winsup/cygwin/spawn.cc winsup/cygwin/speclib winsup/cygwin/stackdump.sgml winsup/cygwin/strace.cc winsup/cygwin/strfuncs.cc winsup/cygwin/string.h winsup/cygwin/strsep.cc winsup/cygwin/strsig.cc winsup/cygwin/sync.cc winsup/cygwin/sync.h winsup/cygwin/syscalls.cc winsup/cygwin/sysconf.cc winsup/cygwin/syslog.cc winsup/cygwin/termios.cc winsup/cygwin/textmode.c winsup/cygwin/textreadmode.c winsup/cygwin/thread.cc winsup/cygwin/thread.h winsup/cygwin/timer.cc winsup/cygwin/times.cc winsup/cygwin/tlsoffsets.h winsup/cygwin/tty.cc winsup/cygwin/tty.h winsup/cygwin/tz_posixrules.h winsup/cygwin/uinfo.cc winsup/cygwin/uname.cc winsup/cygwin/wait.cc winsup/cygwin/wchar.h winsup/cygwin/winbase.h winsup/cygwin/wincap.cc winsup/cygwin/wincap.h winsup/cygwin/window.cc winsup/cygwin/winf.cc winsup/cygwin/winf.h winsup/cygwin/wininfo.h winsup/cygwin/winsup.h winsup/cygwin/winver.rc winsup/doc/ChangeLog winsup/doc/Makefile.in winsup/doc/README winsup/doc/aclocal.m4 winsup/doc/configure winsup/doc/configure.in winsup/doc/cygserver.sgml winsup/doc/cygwin-api.in.sgml winsup/doc/cygwin-ug-net.in.sgml winsup/doc/cygwin-ug.in.sgml winsup/doc/cygwin.dsl winsup/doc/cygwinenv.sgml winsup/doc/dll.sgml winsup/doc/doctool.c winsup/doc/doctool.txt winsup/doc/effectively.sgml winsup/doc/faq-api.xml winsup/doc/faq-problems.xml winsup/doc/faq-programming.xml winsup/doc/faq-resources.xml winsup/doc/faq-sections.xml winsup/doc/faq-setup.xml winsup/doc/faq-using.xml winsup/doc/faq-what.xml winsup/doc/faq.xml winsup/doc/fhandler-tut.txt winsup/doc/filemodes.sgml winsup/doc/gcc.sgml winsup/doc/gdb.sgml winsup/doc/legal.sgml winsup/doc/ntsec.sgml winsup/doc/overview.sgml winsup/doc/overview2.sgml winsup/doc/pathnames.sgml winsup/doc/programming.sgml winsup/doc/setup-net.sgml winsup/doc/setup.sgml winsup/doc/setup2.sgml winsup/doc/textbinary.sgml winsup/doc/using.sgml winsup/doc/windres.sgml winsup/lsaauth/ChangeLog winsup/lsaauth/Makefile.in winsup/lsaauth/aclocal.m4 winsup/lsaauth/configure winsup/lsaauth/configure.in winsup/lsaauth/cyglsa-config winsup/lsaauth/cyglsa.c winsup/lsaauth/cyglsa.din winsup/lsaauth/cyglsa64.dll winsup/lsaauth/make-64bit-version-with-visual-c.bat winsup/lsaauth/mslsa.def winsup/mingw/CONTRIBUTORS winsup/mingw/CRT_fp10.c winsup/mingw/CRT_fp8.c winsup/mingw/CRT_noglob.c winsup/mingw/CRTfmode.c winsup/mingw/CRTglob.c winsup/mingw/CRTinit.c winsup/mingw/ChangeLog winsup/mingw/DISCLAIMER winsup/mingw/Makefile.in winsup/mingw/README winsup/mingw/TODO winsup/mingw/aclocal.m4 winsup/mingw/binmode.c winsup/mingw/config.guess winsup/mingw/config.sub winsup/mingw/configure winsup/mingw/configure.in winsup/mingw/cpu_features.c winsup/mingw/cpu_features.h winsup/mingw/crt1.c winsup/mingw/crtdll.def winsup/mingw/crtmt.c winsup/mingw/crtst.c winsup/mingw/dllcrt1.c winsup/mingw/dllmain.c winsup/mingw/gccmain.c winsup/mingw/include/_mingw.h winsup/mingw/include/assert.h winsup/mingw/include/complex.h winsup/mingw/include/conio.h winsup/mingw/include/ctype.h winsup/mingw/include/dir.h winsup/mingw/include/direct.h winsup/mingw/include/dirent.h winsup/mingw/include/dos.h winsup/mingw/include/errno.h winsup/mingw/include/excpt.h winsup/mingw/include/fcntl.h winsup/mingw/include/fenv.h winsup/mingw/include/float.h winsup/mingw/include/getopt.h winsup/mingw/include/inttypes.h winsup/mingw/include/io.h winsup/mingw/include/libgen.h winsup/mingw/include/limits.h winsup/mingw/include/locale.h winsup/mingw/include/malloc.h winsup/mingw/include/math.h winsup/mingw/include/mbctype.h winsup/mingw/include/mbstring.h winsup/mingw/include/mem.h winsup/mingw/include/memory.h winsup/mingw/include/process.h winsup/mingw/include/search.h winsup/mingw/include/setjmp.h winsup/mingw/include/share.h winsup/mingw/include/signal.h winsup/mingw/include/stdint.h winsup/mingw/include/stdio.h winsup/mingw/include/stdlib.h winsup/mingw/include/string.h winsup/mingw/include/strings.h winsup/mingw/include/sys/fcntl.h winsup/mingw/include/sys/file.h winsup/mingw/include/sys/locking.h winsup/mingw/include/sys/param.h winsup/mingw/include/sys/stat.h winsup/mingw/include/sys/time.h winsup/mingw/include/sys/timeb.h winsup/mingw/include/sys/types.h winsup/mingw/include/sys/unistd.h winsup/mingw/include/sys/utime.h winsup/mingw/include/tchar.h winsup/mingw/include/time.h winsup/mingw/include/unistd.h winsup/mingw/include/utime.h winsup/mingw/include/values.h winsup/mingw/include/varargs.h winsup/mingw/include/wchar.h winsup/mingw/include/wctype.h winsup/mingw/init.c winsup/mingw/install-sh winsup/mingw/isascii.c winsup/mingw/iscsym.c winsup/mingw/iscsymf.c winsup/mingw/jamfile winsup/mingw/main.c winsup/mingw/man/dirname.man winsup/mingw/mingwex/Makefile.in winsup/mingw/mingwex/_Exit.c winsup/mingw/mingwex/aclocal.m4 winsup/mingw/mingwex/atoll.c winsup/mingw/mingwex/basename.c winsup/mingw/mingwex/btowc.c winsup/mingw/mingwex/complex/cabs.c winsup/mingw/mingwex/complex/cabsf.c winsup/mingw/mingwex/complex/cabsl.c winsup/mingw/mingwex/complex/cacos.c winsup/mingw/mingwex/complex/cacosf.c winsup/mingw/mingwex/complex/cacosh.c winsup/mingw/mingwex/complex/cacoshf.c winsup/mingw/mingwex/complex/cacoshl.c winsup/mingw/mingwex/complex/cacosl.c winsup/mingw/mingwex/complex/carg.c winsup/mingw/mingwex/complex/cargf.c winsup/mingw/mingwex/complex/cargl.c winsup/mingw/mingwex/complex/casin.c winsup/mingw/mingwex/complex/casinf.c winsup/mingw/mingwex/complex/casinh.c winsup/mingw/mingwex/complex/casinhf.c winsup/mingw/mingwex/complex/casinhl.c winsup/mingw/mingwex/complex/casinl.c winsup/mingw/mingwex/complex/catan.c winsup/mingw/mingwex/complex/catanf.c winsup/mingw/mingwex/complex/catanh.c winsup/mingw/mingwex/complex/catanhf.c winsup/mingw/mingwex/complex/catanhl.c winsup/mingw/mingwex/complex/catanl.c winsup/mingw/mingwex/complex/ccos.c winsup/mingw/mingwex/complex/ccosf.c winsup/mingw/mingwex/complex/ccosh.c winsup/mingw/mingwex/complex/ccoshf.c winsup/mingw/mingwex/complex/ccoshl.c winsup/mingw/mingwex/complex/ccosl.c winsup/mingw/mingwex/complex/cexp.c winsup/mingw/mingwex/complex/cexpf.c winsup/mingw/mingwex/complex/cexpl.c winsup/mingw/mingwex/complex/cimag.c winsup/mingw/mingwex/complex/cimagf.c winsup/mingw/mingwex/complex/cimagl.c winsup/mingw/mingwex/complex/clog.c winsup/mingw/mingwex/complex/clogf.c winsup/mingw/mingwex/complex/clogl.c winsup/mingw/mingwex/complex/cpow.c winsup/mingw/mingwex/complex/cpowf.c winsup/mingw/mingwex/complex/cpowl.c winsup/mingw/mingwex/complex/cproj.c winsup/mingw/mingwex/complex/cprojf.c winsup/mingw/mingwex/complex/cprojl.c winsup/mingw/mingwex/complex/creal.c winsup/mingw/mingwex/complex/crealf.c winsup/mingw/mingwex/complex/creall.c winsup/mingw/mingwex/complex/csin.c winsup/mingw/mingwex/complex/csinf.c winsup/mingw/mingwex/complex/csinh.c winsup/mingw/mingwex/complex/csinhf.c winsup/mingw/mingwex/complex/csinhl.c winsup/mingw/mingwex/complex/csinl.c winsup/mingw/mingwex/complex/csqrt.c winsup/mingw/mingwex/complex/csqrtf.c winsup/mingw/mingwex/complex/csqrtl.c winsup/mingw/mingwex/complex/ctan.c winsup/mingw/mingwex/complex/ctanf.c winsup/mingw/mingwex/complex/ctanh.c winsup/mingw/mingwex/complex/ctanhf.c winsup/mingw/mingwex/complex/ctanhl.c winsup/mingw/mingwex/complex/ctanl.c winsup/mingw/mingwex/configure winsup/mingw/mingwex/configure.in winsup/mingw/mingwex/dirent.c winsup/mingw/mingwex/dirname.c winsup/mingw/mingwex/feclearexcept.c winsup/mingw/mingwex/fegetenv.c winsup/mingw/mingwex/fegetexceptflag.c winsup/mingw/mingwex/fegetround.c winsup/mingw/mingwex/feholdexcept.c winsup/mingw/mingwex/feraiseexcept.c winsup/mingw/mingwex/fesetenv.c winsup/mingw/mingwex/fesetexceptflag.c winsup/mingw/mingwex/fesetround.c winsup/mingw/mingwex/fetestexcept.c winsup/mingw/mingwex/feupdateenv.c winsup/mingw/mingwex/ftruncate.c winsup/mingw/mingwex/fwide.c winsup/mingw/mingwex/gdtoa/README winsup/mingw/mingwex/gdtoa/arithchk.c winsup/mingw/mingwex/gdtoa/dmisc.c winsup/mingw/mingwex/gdtoa/dtoa.c winsup/mingw/mingwex/gdtoa/g__fmt.c winsup/mingw/mingwex/gdtoa/g_dfmt.c winsup/mingw/mingwex/gdtoa/g_ffmt.c winsup/mingw/mingwex/gdtoa/g_xfmt.c winsup/mingw/mingwex/gdtoa/gd_arith.h winsup/mingw/mingwex/gdtoa/gd_qnan.h winsup/mingw/mingwex/gdtoa/gdtoa.c winsup/mingw/mingwex/gdtoa/gdtoa.h winsup/mingw/mingwex/gdtoa/gdtoaimp.h winsup/mingw/mingwex/gdtoa/gethex.c winsup/mingw/mingwex/gdtoa/gmisc.c winsup/mingw/mingwex/gdtoa/hd_init.c winsup/mingw/mingwex/gdtoa/hexnan.c winsup/mingw/mingwex/gdtoa/mingw_snprintf.c winsup/mingw/mingwex/gdtoa/misc.c winsup/mingw/mingwex/gdtoa/qnan.c winsup/mingw/mingwex/gdtoa/smisc.c winsup/mingw/mingwex/gdtoa/strtodg.c winsup/mingw/mingwex/gdtoa/strtodnrp.c winsup/mingw/mingwex/gdtoa/strtof.c winsup/mingw/mingwex/gdtoa/strtopx.c winsup/mingw/mingwex/gdtoa/sum.c winsup/mingw/mingwex/gdtoa/ulp.c winsup/mingw/mingwex/getopt.c winsup/mingw/mingwex/gettimeofday.c winsup/mingw/mingwex/imaxabs.c winsup/mingw/mingwex/imaxdiv.c winsup/mingw/mingwex/isblank.c winsup/mingw/mingwex/iswblank.c winsup/mingw/mingwex/lltoa.c winsup/mingw/mingwex/lltow.c winsup/mingw/mingwex/math/acosf.c winsup/mingw/mingwex/math/acosh.c winsup/mingw/mingwex/math/acoshf.c winsup/mingw/mingwex/math/acoshl.c winsup/mingw/mingwex/math/acosl.c winsup/mingw/mingwex/math/asinf.c winsup/mingw/mingwex/math/asinh.c winsup/mingw/mingwex/math/asinhf.c winsup/mingw/mingwex/math/asinhl.c winsup/mingw/mingwex/math/asinl.c winsup/mingw/mingwex/math/atan2f.c winsup/mingw/mingwex/math/atan2l.c winsup/mingw/mingwex/math/atanf.c winsup/mingw/mingwex/math/atanh.c winsup/mingw/mingwex/math/atanhf.c winsup/mingw/mingwex/math/atanhl.c winsup/mingw/mingwex/math/atanl.c winsup/mingw/mingwex/math/cbrt.c winsup/mingw/mingwex/math/cbrtf.c winsup/mingw/mingwex/math/cbrtl.c winsup/mingw/mingwex/math/ceilf.S winsup/mingw/mingwex/math/ceill.S winsup/mingw/mingwex/math/cephes_mconf.h winsup/mingw/mingwex/math/copysign.S winsup/mingw/mingwex/math/copysignf.S winsup/mingw/mingwex/math/copysignl.S winsup/mingw/mingwex/math/cosf.S winsup/mingw/mingwex/math/coshf.c winsup/mingw/mingwex/math/coshl.c winsup/mingw/mingwex/math/cosl.S winsup/mingw/mingwex/math/erfl.c winsup/mingw/mingwex/math/exp2.S winsup/mingw/mingwex/math/exp2f.S winsup/mingw/mingwex/math/exp2l.S winsup/mingw/mingwex/math/expf.c winsup/mingw/mingwex/math/expl.c winsup/mingw/mingwex/math/expm1.c winsup/mingw/mingwex/math/expm1f.c winsup/mingw/mingwex/math/expm1l.c winsup/mingw/mingwex/math/fabs.c winsup/mingw/mingwex/math/fabsf.c winsup/mingw/mingwex/math/fabsl.c winsup/mingw/mingwex/math/fastmath.h winsup/mingw/mingwex/math/fdim.c winsup/mingw/mingwex/math/fdimf.c winsup/mingw/mingwex/math/fdiml.c winsup/mingw/mingwex/math/floorf.S winsup/mingw/mingwex/math/floorl.S winsup/mingw/mingwex/math/fma.S winsup/mingw/mingwex/math/fmaf.S winsup/mingw/mingwex/math/fmal.c winsup/mingw/mingwex/math/fmax.c winsup/mingw/mingwex/math/fmaxf.c winsup/mingw/mingwex/math/fmaxl.c winsup/mingw/mingwex/math/fmin.c winsup/mingw/mingwex/math/fminf.c winsup/mingw/mingwex/math/fminl.c winsup/mingw/mingwex/math/fmodf.c winsup/mingw/mingwex/math/fmodl.c winsup/mingw/mingwex/math/fp_consts.c winsup/mingw/mingwex/math/fp_consts.h winsup/mingw/mingwex/math/fp_constsf.c winsup/mingw/mingwex/math/fp_constsl.c winsup/mingw/mingwex/math/fpclassify.c winsup/mingw/mingwex/math/fpclassifyf.c winsup/mingw/mingwex/math/fpclassifyl.c winsup/mingw/mingwex/math/frexpf.c winsup/mingw/mingwex/math/frexpl.S winsup/mingw/mingwex/math/fucom.c winsup/mingw/mingwex/math/hypotf.c winsup/mingw/mingwex/math/hypotl.c winsup/mingw/mingwex/math/ilogb.S winsup/mingw/mingwex/math/ilogbf.S winsup/mingw/mingwex/math/ilogbl.S winsup/mingw/mingwex/math/isnan.c winsup/mingw/mingwex/math/isnanf.c winsup/mingw/mingwex/math/isnanl.c winsup/mingw/mingwex/math/ldexpf.c winsup/mingw/mingwex/math/ldexpl.c winsup/mingw/mingwex/math/lgamma.c winsup/mingw/mingwex/math/lgammaf.c winsup/mingw/mingwex/math/lgammal.c winsup/mingw/mingwex/math/llrint.c winsup/mingw/mingwex/math/llrintf.c winsup/mingw/mingwex/math/llrintl.c winsup/mingw/mingwex/math/llround.c winsup/mingw/mingwex/math/llroundf.c winsup/mingw/mingwex/math/llroundl.c winsup/mingw/mingwex/math/log10f.S winsup/mingw/mingwex/math/log10l.S winsup/mingw/mingwex/math/log1p.S winsup/mingw/mingwex/math/log1pf.S winsup/mingw/mingwex/math/log1pl.S winsup/mingw/mingwex/math/log2.S winsup/mingw/mingwex/math/log2f.S winsup/mingw/mingwex/math/log2l.S winsup/mingw/mingwex/math/logb.c winsup/mingw/mingwex/math/logbf.c winsup/mingw/mingwex/math/logbl.c winsup/mingw/mingwex/math/logf.S winsup/mingw/mingwex/math/logl.S winsup/mingw/mingwex/math/lrint.c winsup/mingw/mingwex/math/lrintf.c winsup/mingw/mingwex/math/lrintl.c winsup/mingw/mingwex/math/lround.c winsup/mingw/mingwex/math/lroundf.c winsup/mingw/mingwex/math/lroundl.c winsup/mingw/mingwex/math/modff.c winsup/mingw/mingwex/math/modfl.c winsup/mingw/mingwex/math/nearbyint.S winsup/mingw/mingwex/math/nearbyintf.S winsup/mingw/mingwex/math/nearbyintl.S winsup/mingw/mingwex/math/nextafterf.c winsup/mingw/mingwex/math/nextafterl.c winsup/mingw/mingwex/math/nexttoward.c winsup/mingw/mingwex/math/nexttowardf.c winsup/mingw/mingwex/math/pow.c winsup/mingw/mingwex/math/powf.c winsup/mingw/mingwex/math/powi.c winsup/mingw/mingwex/math/powif.c winsup/mingw/mingwex/math/powil.c winsup/mingw/mingwex/math/powl.c winsup/mingw/mingwex/math/remainder.S winsup/mingw/mingwex/math/remainderf.S winsup/mingw/mingwex/math/remainderl.S winsup/mingw/mingwex/math/remquo.S winsup/mingw/mingwex/math/remquof.S winsup/mingw/mingwex/math/remquol.S winsup/mingw/mingwex/math/rint.c winsup/mingw/mingwex/math/rintf.c winsup/mingw/mingwex/math/rintl.c winsup/mingw/mingwex/math/round.c winsup/mingw/mingwex/math/roundf.c winsup/mingw/mingwex/math/roundl.c winsup/mingw/mingwex/math/s_erf.c winsup/mingw/mingwex/math/scalbn.S winsup/mingw/mingwex/math/scalbnf.S winsup/mingw/mingwex/math/scalbnl.S winsup/mingw/mingwex/math/sf_erf.c winsup/mingw/mingwex/math/signbit.c winsup/mingw/mingwex/math/signbitf.c winsup/mingw/mingwex/math/signbitl.c winsup/mingw/mingwex/math/sinf.S winsup/mingw/mingwex/math/sinhf.c winsup/mingw/mingwex/math/sinhl.c winsup/mingw/mingwex/math/sinl.S winsup/mingw/mingwex/math/sqrtf.c winsup/mingw/mingwex/math/sqrtl.c winsup/mingw/mingwex/math/tanf.S winsup/mingw/mingwex/math/tanhf.c winsup/mingw/mingwex/math/tanhl.c winsup/mingw/mingwex/math/tanl.S winsup/mingw/mingwex/math/tgamma.c winsup/mingw/mingwex/math/tgammaf.c winsup/mingw/mingwex/math/tgammal.c winsup/mingw/mingwex/math/trunc.c winsup/mingw/mingwex/math/truncf.c winsup/mingw/mingwex/math/truncl.c winsup/mingw/mingwex/mb_wc_common.h winsup/mingw/mingwex/mbrtowc.c winsup/mingw/mingwex/mbsinit.c winsup/mingw/mingwex/mingw-aligned-malloc.c winsup/mingw/mingwex/mingw-fseek.c winsup/mingw/mingwex/sitest.c winsup/mingw/mingwex/stdio/fopen64.c winsup/mingw/mingwex/stdio/fseeko64.c winsup/mingw/mingwex/stdio/ftello64.c winsup/mingw/mingwex/stdio/lseek64.c winsup/mingw/mingwex/stdio/snwprintf.c winsup/mingw/mingwex/stdio/vfscanf.c winsup/mingw/mingwex/stdio/vfwscanf.c winsup/mingw/mingwex/stdio/vscanf.c winsup/mingw/mingwex/stdio/vsnwprintf.c winsup/mingw/mingwex/stdio/vsscanf.c winsup/mingw/mingwex/stdio/vswscanf.c winsup/mingw/mingwex/stdio/vwscanf.c winsup/mingw/mingwex/strtoimax.c winsup/mingw/mingwex/strtoumax.c winsup/mingw/mingwex/tdelete.c winsup/mingw/mingwex/testwmem.c winsup/mingw/mingwex/tfind.c winsup/mingw/mingwex/tsearch.c winsup/mingw/mingwex/tst-aligned-malloc.c winsup/mingw/mingwex/twalk.c winsup/mingw/mingwex/ulltoa.c winsup/mingw/mingwex/ulltow.c winsup/mingw/mingwex/wcrtomb.c winsup/mingw/mingwex/wcstof.c winsup/mingw/mingwex/wcstoimax.c winsup/mingw/mingwex/wcstold.c winsup/mingw/mingwex/wcstoumax.c winsup/mingw/mingwex/wctob.c winsup/mingw/mingwex/wctrans.c winsup/mingw/mingwex/wctype.c winsup/mingw/mingwex/wdirent.c winsup/mingw/mingwex/wmemchr.c winsup/mingw/mingwex/wmemcmp.c winsup/mingw/mingwex/wmemcpy.c winsup/mingw/mingwex/wmemmove.c winsup/mingw/mingwex/wmemset.c winsup/mingw/mingwex/wtoll.c winsup/mingw/mkinstalldirs winsup/mingw/moldname.def.in winsup/mingw/msvcrt.def.in winsup/mingw/mthr.c winsup/mingw/mthr_init.c winsup/mingw/mthr_stub.c winsup/mingw/profile/COPYING winsup/mingw/profile/CYGWIN_LICENSE winsup/mingw/profile/Makefile.in winsup/mingw/profile/aclocal.m4 winsup/mingw/profile/configure winsup/mingw/profile/configure.in winsup/mingw/profile/gcrt0.c winsup/mingw/profile/gmon.c winsup/mingw/profile/gmon.h winsup/mingw/profile/mcount.c winsup/mingw/profile/profil.c winsup/mingw/profile/profil.h winsup/mingw/profile/profile.h winsup/mingw/pseudo-reloc-list.c winsup/mingw/pseudo-reloc.c winsup/mingw/readme.txt winsup/mingw/samples/dirent/jamfile winsup/mingw/samples/dirent/test.c winsup/mingw/samples/dirent/wtest.c winsup/mingw/samples/dlltest/dll.c winsup/mingw/samples/dlltest/dll.def winsup/mingw/samples/dlltest/dll.h winsup/mingw/samples/dlltest/exe.c winsup/mingw/samples/dlltest/exe.exp winsup/mingw/samples/dlltest/expexe.c winsup/mingw/samples/dlltest/expexe.def winsup/mingw/samples/dlltest/jamfile winsup/mingw/samples/dlltest/loaddll.c winsup/mingw/samples/dlltest/loadexe.c winsup/mingw/samples/dlltest/readme.txt winsup/mingw/samples/dlltest/silly.cpp winsup/mingw/samples/dlltest/silly.def winsup/mingw/samples/dlltest/silly.exp winsup/mingw/samples/dlltest/silly.h winsup/mingw/samples/dlltest/sillydll.cpp winsup/mingw/samples/filehand/filehand.c winsup/mingw/samples/filehand/jamfile winsup/mingw/samples/filehand/junk.txt winsup/mingw/samples/fixargv/fixargv.c winsup/mingw/samples/fixargv/fixargv.h winsup/mingw/samples/fixargv/readme.txt winsup/mingw/samples/fmode/all.c winsup/mingw/samples/fmode/jamfile winsup/mingw/samples/fmode/readme.txt winsup/mingw/samples/fmode/test.c winsup/mingw/samples/fmode/test2.c winsup/mingw/samples/globbing/glob.c winsup/mingw/samples/globbing/jamfile winsup/mingw/samples/globbing/noglob.c winsup/mingw/samples/globbing/readme.txt winsup/mingw/samples/print/jamfile winsup/mingw/samples/print/prntest.c winsup/mingw/samples/seh/eh3.c winsup/mingw/samples/seh/exutil.c winsup/mingw/samples/seh/exutil.def winsup/mingw/samples/seh/exutil.h winsup/mingw/samples/seh/jamfile winsup/mingw/samples/seh/sehfix.c winsup/mingw/samples/seh/sehsub.c winsup/mingw/samples/seh/sehtest.c winsup/mingw/samples/simpledll/dll.c winsup/mingw/samples/simpledll/dll.cpp winsup/mingw/samples/simpledll/dll.def winsup/mingw/samples/simpledll/exe.c winsup/mingw/samples/simpledll/jamfile winsup/mingw/samples/simpledll/makedll.bat winsup/mingw/samples/test/jamfile winsup/mingw/samples/test/test.c winsup/mingw/samples/wintest/jamfile winsup/mingw/samples/wintest/test.c winsup/mingw/strcasecmp.c winsup/mingw/strncasecmp.c winsup/mingw/test_headers.c winsup/mingw/toascii.c winsup/mingw/txtmode.c winsup/mingw/wcscmpi.c winsup/testsuite/ChangeLog winsup/testsuite/Makefile.in winsup/testsuite/README winsup/testsuite/aclocal.m4 winsup/testsuite/config/default.exp winsup/testsuite/configure winsup/testsuite/configure.in winsup/testsuite/cygrun.c winsup/testsuite/libltp/include/dataascii.h winsup/testsuite/libltp/include/databin.h winsup/testsuite/libltp/include/file_lock.h winsup/testsuite/libltp/include/forker.h winsup/testsuite/libltp/include/open_flags.h winsup/testsuite/libltp/include/pattern.h winsup/testsuite/libltp/include/random_range.h winsup/testsuite/libltp/include/rmobj.h winsup/testsuite/libltp/include/search_path.h winsup/testsuite/libltp/include/str_to_bytes.h winsup/testsuite/libltp/include/string_to_tokens.h winsup/testsuite/libltp/include/test.h winsup/testsuite/libltp/include/tlibio.h winsup/testsuite/libltp/include/usctest.h winsup/testsuite/libltp/include/write_log.h winsup/testsuite/libltp/lib/dataascii.c winsup/testsuite/libltp/lib/databin.c winsup/testsuite/libltp/lib/datapid.c winsup/testsuite/libltp/lib/forker.c winsup/testsuite/libltp/lib/get_high_address.c winsup/testsuite/libltp/lib/libtestsuite.c winsup/testsuite/libltp/lib/open_flags.c winsup/testsuite/libltp/lib/parse_opts.c winsup/testsuite/libltp/lib/pattern.c winsup/testsuite/libltp/lib/rmobj.c winsup/testsuite/libltp/lib/search_path.c winsup/testsuite/libltp/lib/str_to_bytes.c winsup/testsuite/libltp/lib/string_to_tokens.c winsup/testsuite/libltp/lib/tst_res.c winsup/testsuite/libltp/lib/tst_sig.c winsup/testsuite/libltp/lib/tst_tmpdir.c winsup/testsuite/libltp/lib/write_log.c winsup/testsuite/winsup.api/checksignal.c winsup/testsuite/winsup.api/crlf.c winsup/testsuite/winsup.api/cygload.cc winsup/testsuite/winsup.api/cygload.exp winsup/testsuite/winsup.api/cygload.h winsup/testsuite/winsup.api/devdsp.c winsup/testsuite/winsup.api/devdsp_okay.h winsup/testsuite/winsup.api/devzero.c winsup/testsuite/winsup.api/iospeed.c winsup/testsuite/winsup.api/known_bugs.tcl winsup/testsuite/winsup.api/ltp/access01.c winsup/testsuite/winsup.api/ltp/access03.c winsup/testsuite/winsup.api/ltp/access04.c winsup/testsuite/winsup.api/ltp/access05.c winsup/testsuite/winsup.api/ltp/alarm01.c winsup/testsuite/winsup.api/ltp/alarm02.c winsup/testsuite/winsup.api/ltp/alarm03.c winsup/testsuite/winsup.api/ltp/alarm07.c winsup/testsuite/winsup.api/ltp/asyncio02.c winsup/testsuite/winsup.api/ltp/chdir02.c winsup/testsuite/winsup.api/ltp/chdir04.c winsup/testsuite/winsup.api/ltp/chmod01.c winsup/testsuite/winsup.api/ltp/chmod02.c winsup/testsuite/winsup.api/ltp/chown01.c winsup/testsuite/winsup.api/ltp/close01.c winsup/testsuite/winsup.api/ltp/close02.c winsup/testsuite/winsup.api/ltp/close08.c winsup/testsuite/winsup.api/ltp/creat01.c winsup/testsuite/winsup.api/ltp/creat03.c winsup/testsuite/winsup.api/ltp/creat09.c winsup/testsuite/winsup.api/ltp/dup01.c winsup/testsuite/winsup.api/ltp/dup02.c winsup/testsuite/winsup.api/ltp/dup03.c winsup/testsuite/winsup.api/ltp/dup04.c winsup/testsuite/winsup.api/ltp/dup05.c winsup/testsuite/winsup.api/ltp/execl01.c winsup/testsuite/winsup.api/ltp/execle01.c winsup/testsuite/winsup.api/ltp/execlp01.c winsup/testsuite/winsup.api/ltp/execv01.c winsup/testsuite/winsup.api/ltp/execve01.c winsup/testsuite/winsup.api/ltp/execvp01.c winsup/testsuite/winsup.api/ltp/exit01.c winsup/testsuite/winsup.api/ltp/exit02.c winsup/testsuite/winsup.api/ltp/fchdir01.c winsup/testsuite/winsup.api/ltp/fchdir02.c winsup/testsuite/winsup.api/ltp/fchmod01.c winsup/testsuite/winsup.api/ltp/fchown01.c winsup/testsuite/winsup.api/ltp/fcntl02.c winsup/testsuite/winsup.api/ltp/fcntl03.c winsup/testsuite/winsup.api/ltp/fcntl04.c winsup/testsuite/winsup.api/ltp/fcntl05.c winsup/testsuite/winsup.api/ltp/fcntl07.c winsup/testsuite/winsup.api/ltp/fcntl07B.c winsup/testsuite/winsup.api/ltp/fcntl08.c winsup/testsuite/winsup.api/ltp/fcntl09.c winsup/testsuite/winsup.api/ltp/fcntl10.c winsup/testsuite/winsup.api/ltp/fork01.c winsup/testsuite/winsup.api/ltp/fork02.c winsup/testsuite/winsup.api/ltp/fork03.c winsup/testsuite/winsup.api/ltp/fork04.c winsup/testsuite/winsup.api/ltp/fork06.c winsup/testsuite/winsup.api/ltp/fork07.c winsup/testsuite/winsup.api/ltp/fork09.c winsup/testsuite/winsup.api/ltp/fork10.c winsup/testsuite/winsup.api/ltp/fork11.c winsup/testsuite/winsup.api/ltp/fpathconf01.c winsup/testsuite/winsup.api/ltp/fstat01.c winsup/testsuite/winsup.api/ltp/fstat02.c winsup/testsuite/winsup.api/ltp/fstat03.c winsup/testsuite/winsup.api/ltp/fstat04.c winsup/testsuite/winsup.api/ltp/fsync01.c winsup/testsuite/winsup.api/ltp/ftruncate01.c winsup/testsuite/winsup.api/ltp/ftruncate02.c winsup/testsuite/winsup.api/ltp/ftruncate03.c winsup/testsuite/winsup.api/ltp/getegid01.c winsup/testsuite/winsup.api/ltp/geteuid01.c winsup/testsuite/winsup.api/ltp/getgid01.c winsup/testsuite/winsup.api/ltp/getgid02.c winsup/testsuite/winsup.api/ltp/getgid03.c winsup/testsuite/winsup.api/ltp/getgroups01.c winsup/testsuite/winsup.api/ltp/getgroups02.c winsup/testsuite/winsup.api/ltp/gethostid01.c winsup/testsuite/winsup.api/ltp/gethostname01.c winsup/testsuite/winsup.api/ltp/getpgid01.c winsup/testsuite/winsup.api/ltp/getpgid02.c winsup/testsuite/winsup.api/ltp/getpgrp01.c winsup/testsuite/winsup.api/ltp/getpid01.c winsup/testsuite/winsup.api/ltp/getpid02.c winsup/testsuite/winsup.api/ltp/getppid01.c winsup/testsuite/winsup.api/ltp/getppid02.c winsup/testsuite/winsup.api/ltp/getuid01.c winsup/testsuite/winsup.api/ltp/getuid02.c winsup/testsuite/winsup.api/ltp/getuid03.c winsup/testsuite/winsup.api/ltp/kill01.c winsup/testsuite/winsup.api/ltp/kill02.c winsup/testsuite/winsup.api/ltp/kill03.c winsup/testsuite/winsup.api/ltp/kill04.c winsup/testsuite/winsup.api/ltp/kill09.c winsup/testsuite/winsup.api/ltp/link02.c winsup/testsuite/winsup.api/ltp/link03.c winsup/testsuite/winsup.api/ltp/link04.c winsup/testsuite/winsup.api/ltp/link05.c winsup/testsuite/winsup.api/ltp/lseek01.c winsup/testsuite/winsup.api/ltp/lseek02.c winsup/testsuite/winsup.api/ltp/lseek03.c winsup/testsuite/winsup.api/ltp/lseek04.c winsup/testsuite/winsup.api/ltp/lseek05.c winsup/testsuite/winsup.api/ltp/lseek06.c winsup/testsuite/winsup.api/ltp/lseek07.c winsup/testsuite/winsup.api/ltp/lseek08.c winsup/testsuite/winsup.api/ltp/lseek09.c winsup/testsuite/winsup.api/ltp/lseek10.c winsup/testsuite/winsup.api/ltp/lstat02.c winsup/testsuite/winsup.api/ltp/mkdir01.c winsup/testsuite/winsup.api/ltp/mkdir08.c winsup/testsuite/winsup.api/ltp/mknod01.c winsup/testsuite/winsup.api/ltp/mmap001.c winsup/testsuite/winsup.api/ltp/mmap02.c winsup/testsuite/winsup.api/ltp/mmap03.c winsup/testsuite/winsup.api/ltp/mmap04.c winsup/testsuite/winsup.api/ltp/mmap05.c winsup/testsuite/winsup.api/ltp/mmap06.c winsup/testsuite/winsup.api/ltp/mmap07.c winsup/testsuite/winsup.api/ltp/mmap08.c winsup/testsuite/winsup.api/ltp/munmap01.c winsup/testsuite/winsup.api/ltp/munmap02.c winsup/testsuite/winsup.api/ltp/nice05.c winsup/testsuite/winsup.api/ltp/open02.c winsup/testsuite/winsup.api/ltp/open03.c winsup/testsuite/winsup.api/ltp/pathconf01.c winsup/testsuite/winsup.api/ltp/pause01.c winsup/testsuite/winsup.api/ltp/pipe01.c winsup/testsuite/winsup.api/ltp/pipe08.c winsup/testsuite/winsup.api/ltp/pipe09.c winsup/testsuite/winsup.api/ltp/pipe10.c winsup/testsuite/winsup.api/ltp/pipe11.c winsup/testsuite/winsup.api/ltp/poll01.c winsup/testsuite/winsup.api/ltp/read01.c winsup/testsuite/winsup.api/ltp/read04.c winsup/testsuite/winsup.api/ltp/readdir01.c winsup/testsuite/winsup.api/ltp/readlink01.c winsup/testsuite/winsup.api/ltp/readlink02.c winsup/testsuite/winsup.api/ltp/readlink03.c winsup/testsuite/winsup.api/ltp/rename01.c winsup/testsuite/winsup.api/ltp/rename02.c winsup/testsuite/winsup.api/ltp/rename08.c winsup/testsuite/winsup.api/ltp/rename10.c winsup/testsuite/winsup.api/ltp/rmdir01.c winsup/testsuite/winsup.api/ltp/rmdir04.c winsup/testsuite/winsup.api/ltp/rmdir05.c winsup/testsuite/winsup.api/ltp/sbrk01.c winsup/testsuite/winsup.api/ltp/select01.c winsup/testsuite/winsup.api/ltp/select02.c winsup/testsuite/winsup.api/ltp/select03.c winsup/testsuite/winsup.api/ltp/setgid01.c winsup/testsuite/winsup.api/ltp/setgroups01.c winsup/testsuite/winsup.api/ltp/setpgid01.c winsup/testsuite/winsup.api/ltp/setregid01.c winsup/testsuite/winsup.api/ltp/setreuid01.c winsup/testsuite/winsup.api/ltp/setuid01.c winsup/testsuite/winsup.api/ltp/setuid02.c winsup/testsuite/winsup.api/ltp/signal03.c winsup/testsuite/winsup.api/ltp/stat01.c winsup/testsuite/winsup.api/ltp/stat02.c winsup/testsuite/winsup.api/ltp/stat03.c winsup/testsuite/winsup.api/ltp/stat05.c winsup/testsuite/winsup.api/ltp/stat06.c winsup/testsuite/winsup.api/ltp/symlink01.c winsup/testsuite/winsup.api/ltp/symlink02.c winsup/testsuite/winsup.api/ltp/symlink03.c winsup/testsuite/winsup.api/ltp/symlink04.c winsup/testsuite/winsup.api/ltp/symlink05.c winsup/testsuite/winsup.api/ltp/sync01.c winsup/testsuite/winsup.api/ltp/sync02.c winsup/testsuite/winsup.api/ltp/time01.c winsup/testsuite/winsup.api/ltp/time02.c winsup/testsuite/winsup.api/ltp/times01.c winsup/testsuite/winsup.api/ltp/times02.c winsup/testsuite/winsup.api/ltp/times03.c winsup/testsuite/winsup.api/ltp/truncate01.c winsup/testsuite/winsup.api/ltp/truncate02.c winsup/testsuite/winsup.api/ltp/ulimit01.c winsup/testsuite/winsup.api/ltp/umask01.c winsup/testsuite/winsup.api/ltp/umask02.c winsup/testsuite/winsup.api/ltp/umask03.c winsup/testsuite/winsup.api/ltp/uname01.c winsup/testsuite/winsup.api/ltp/unlink05.c winsup/testsuite/winsup.api/ltp/unlink06.c winsup/testsuite/winsup.api/ltp/unlink07.c winsup/testsuite/winsup.api/ltp/unlink08.c winsup/testsuite/winsup.api/ltp/vfork01.c winsup/testsuite/winsup.api/ltp/wait02.c winsup/testsuite/winsup.api/ltp/wait401.c winsup/testsuite/winsup.api/ltp/wait402.c winsup/testsuite/winsup.api/ltp/write01.c winsup/testsuite/winsup.api/ltp/write02.c winsup/testsuite/winsup.api/ltp/write03.c winsup/testsuite/winsup.api/mmaptest01.c winsup/testsuite/winsup.api/mmaptest02.c winsup/testsuite/winsup.api/mmaptest03.c winsup/testsuite/winsup.api/mmaptest04.c winsup/testsuite/winsup.api/msgtest.c winsup/testsuite/winsup.api/nullgetcwd.c winsup/testsuite/winsup.api/pthread/cancel1.c winsup/testsuite/winsup.api/pthread/cancel10.c winsup/testsuite/winsup.api/pthread/cancel11.c winsup/testsuite/winsup.api/pthread/cancel12.c winsup/testsuite/winsup.api/pthread/cancel2.c winsup/testsuite/winsup.api/pthread/cancel3.c winsup/testsuite/winsup.api/pthread/cancel4.c winsup/testsuite/winsup.api/pthread/cancel5.c winsup/testsuite/winsup.api/pthread/cancel6.c winsup/testsuite/winsup.api/pthread/cancel7.c winsup/testsuite/winsup.api/pthread/cancel8.c winsup/testsuite/winsup.api/pthread/cancel9.c winsup/testsuite/winsup.api/pthread/cleanup2.c winsup/testsuite/winsup.api/pthread/cleanup3.c winsup/testsuite/winsup.api/pthread/condvar1.c winsup/testsuite/winsup.api/pthread/condvar2.c winsup/testsuite/winsup.api/pthread/condvar2_1.c winsup/testsuite/winsup.api/pthread/condvar3.c winsup/testsuite/winsup.api/pthread/condvar3_1.c winsup/testsuite/winsup.api/pthread/condvar3_2.c winsup/testsuite/winsup.api/pthread/condvar3_3.c winsup/testsuite/winsup.api/pthread/condvar4.c winsup/testsuite/winsup.api/pthread/condvar5.c winsup/testsuite/winsup.api/pthread/condvar6.c winsup/testsuite/winsup.api/pthread/condvar7.c winsup/testsuite/winsup.api/pthread/condvar8.c winsup/testsuite/winsup.api/pthread/condvar9.c winsup/testsuite/winsup.api/pthread/count1.c winsup/testsuite/winsup.api/pthread/create1.c winsup/testsuite/winsup.api/pthread/create2.c winsup/testsuite/winsup.api/pthread/equal1.c winsup/testsuite/winsup.api/pthread/exit1.c winsup/testsuite/winsup.api/pthread/exit2.c winsup/testsuite/winsup.api/pthread/exit3.c winsup/testsuite/winsup.api/pthread/inherit1.c winsup/testsuite/winsup.api/pthread/join0.c winsup/testsuite/winsup.api/pthread/join1.c winsup/testsuite/winsup.api/pthread/join2.c winsup/testsuite/winsup.api/pthread/mainthreadexits.c winsup/testsuite/winsup.api/pthread/mutex1.c winsup/testsuite/winsup.api/pthread/mutex1d.c winsup/testsuite/winsup.api/pthread/mutex1e.c winsup/testsuite/winsup.api/pthread/mutex1n.c winsup/testsuite/winsup.api/pthread/mutex1r.c winsup/testsuite/winsup.api/pthread/mutex2.c winsup/testsuite/winsup.api/pthread/mutex3.c winsup/testsuite/winsup.api/pthread/mutex4.c winsup/testsuite/winsup.api/pthread/mutex5.c winsup/testsuite/winsup.api/pthread/mutex6d.c winsup/testsuite/winsup.api/pthread/mutex6e.c winsup/testsuite/winsup.api/pthread/mutex6n.c winsup/testsuite/winsup.api/pthread/mutex6r.c winsup/testsuite/winsup.api/pthread/mutex7.c winsup/testsuite/winsup.api/pthread/mutex7d.c winsup/testsuite/winsup.api/pthread/mutex7e.c winsup/testsuite/winsup.api/pthread/mutex7n.c winsup/testsuite/winsup.api/pthread/mutex7r.c winsup/testsuite/winsup.api/pthread/mutex8e.c winsup/testsuite/winsup.api/pthread/mutex8n.c winsup/testsuite/winsup.api/pthread/mutex8r.c winsup/testsuite/winsup.api/pthread/once1.c winsup/testsuite/winsup.api/pthread/priority1.c winsup/testsuite/winsup.api/pthread/priority2.c winsup/testsuite/winsup.api/pthread/rwlock1.c winsup/testsuite/winsup.api/pthread/rwlock2.c winsup/testsuite/winsup.api/pthread/rwlock3.c winsup/testsuite/winsup.api/pthread/rwlock4.c winsup/testsuite/winsup.api/pthread/rwlock5.c winsup/testsuite/winsup.api/pthread/rwlock6.c winsup/testsuite/winsup.api/pthread/rwlock7.c winsup/testsuite/winsup.api/pthread/self1.c winsup/testsuite/winsup.api/pthread/self2.c winsup/testsuite/winsup.api/pthread/test.h winsup/testsuite/winsup.api/pthread/threadidafterfork.c winsup/testsuite/winsup.api/pthread/tsd1.c winsup/testsuite/winsup.api/resethand.c winsup/testsuite/winsup.api/samples/sample-fail.c winsup/testsuite/winsup.api/samples/sample-miscompile.c winsup/testsuite/winsup.api/samples/sample-pass.c winsup/testsuite/winsup.api/semtest.c winsup/testsuite/winsup.api/shmtest.c winsup/testsuite/winsup.api/sigchld.c winsup/testsuite/winsup.api/signal-into-win32-api.c winsup/testsuite/winsup.api/systemcall.c winsup/testsuite/winsup.api/user_malloc.c winsup/testsuite/winsup.api/waitpid.c winsup/testsuite/winsup.api/winsup.exp winsup/utils/COPYING.dumper winsup/utils/ChangeLog winsup/utils/ChangeLog-2000 winsup/utils/Makefile.in winsup/utils/aclocal.m4 winsup/utils/bloda.cc winsup/utils/configure winsup/utils/configure.in winsup/utils/cygcheck.cc winsup/utils/cygpath.cc winsup/utils/dump_setup.cc winsup/utils/dumper.cc winsup/utils/dumper.h winsup/utils/getfacl.c winsup/utils/ipcrm.c winsup/utils/ipcs.c winsup/utils/kill.cc winsup/utils/mkgroup.c winsup/utils/mkpasswd.c winsup/utils/module_info.cc winsup/utils/mount.cc winsup/utils/parse_pe.cc winsup/utils/passwd.c winsup/utils/path.cc winsup/utils/path.h winsup/utils/ps.cc winsup/utils/regtool.cc winsup/utils/setfacl.c winsup/utils/setmetamode.c winsup/utils/ssp.c winsup/utils/ssp.txt winsup/utils/strace.cc winsup/utils/umount.cc winsup/utils/utils.sgml winsup/w32api/CONTRIBUTIONS winsup/w32api/ChangeLog winsup/w32api/Makefile.in winsup/w32api/README.w32api winsup/w32api/TODO winsup/w32api/aclocal.m4 winsup/w32api/config.guess winsup/w32api/config.sub winsup/w32api/configure winsup/w32api/configure.in winsup/w32api/include/GL/gl.h winsup/w32api/include/GL/glext.h winsup/w32api/include/GL/glu.h winsup/w32api/include/accctrl.h winsup/w32api/include/aclapi.h winsup/w32api/include/aclui.h winsup/w32api/include/adsprop.h winsup/w32api/include/afxres.h winsup/w32api/include/amaudio.h winsup/w32api/include/amvideo.h winsup/w32api/include/audevcod.h winsup/w32api/include/aviriff.h winsup/w32api/include/aygshell.h winsup/w32api/include/basetsd.h winsup/w32api/include/basetyps.h winsup/w32api/include/bdatypes.h winsup/w32api/include/cderr.h winsup/w32api/include/cguid.h winsup/w32api/include/cmnquery.h winsup/w32api/include/comcat.h winsup/w32api/include/commctrl.h winsup/w32api/include/commdlg.h winsup/w32api/include/control.h winsup/w32api/include/cpl.h winsup/w32api/include/cplext.h winsup/w32api/include/custcntl.h winsup/w32api/include/dbt.h winsup/w32api/include/dde.h winsup/w32api/include/ddeml.h winsup/w32api/include/ddk/atm.h winsup/w32api/include/ddk/batclass.h winsup/w32api/include/ddk/cfg.h winsup/w32api/include/ddk/cfgmgr32.h winsup/w32api/include/ddk/d4drvif.h winsup/w32api/include/ddk/d4iface.h winsup/w32api/include/ddk/ddkmapi.h winsup/w32api/include/ddk/hidclass.h winsup/w32api/include/ddk/hidpi.h winsup/w32api/include/ddk/hidsdi.h winsup/w32api/include/ddk/hidusage.h winsup/w32api/include/ddk/kbdmou.h winsup/w32api/include/ddk/mcd.h winsup/w32api/include/ddk/miniport.h winsup/w32api/include/ddk/minitape.h winsup/w32api/include/ddk/mountdev.h winsup/w32api/include/ddk/mountmgr.h winsup/w32api/include/ddk/ndis.h winsup/w32api/include/ddk/ndisguid.h winsup/w32api/include/ddk/ndistapi.h winsup/w32api/include/ddk/ndiswan.h winsup/w32api/include/ddk/netevent.h winsup/w32api/include/ddk/netpnp.h winsup/w32api/include/ddk/newdev.h winsup/w32api/include/ddk/ntapi.h winsup/w32api/include/ddk/ntdd8042.h winsup/w32api/include/ddk/ntddbeep.h winsup/w32api/include/ddk/ntddcdrm.h winsup/w32api/include/ddk/ntddcdvd.h winsup/w32api/include/ddk/ntddchgr.h winsup/w32api/include/ddk/ntdddisk.h winsup/w32api/include/ddk/ntddk.h winsup/w32api/include/ddk/ntddkbd.h winsup/w32api/include/ddk/ntddmou.h winsup/w32api/include/ddk/ntddndis.h winsup/w32api/include/ddk/ntddpar.h winsup/w32api/include/ddk/ntddpcm.h winsup/w32api/include/ddk/ntddscsi.h winsup/w32api/include/ddk/ntddser.h winsup/w32api/include/ddk/ntddstor.h winsup/w32api/include/ddk/ntddtape.h winsup/w32api/include/ddk/ntddtdi.h winsup/w32api/include/ddk/ntddvdeo.h winsup/w32api/include/ddk/ntddvol.h winsup/w32api/include/ddk/ntifs.h winsup/w32api/include/ddk/ntpoapi.h winsup/w32api/include/ddk/ntstatus.h winsup/w32api/include/ddk/parallel.h winsup/w32api/include/ddk/pfhook.h winsup/w32api/include/ddk/poclass.h winsup/w32api/include/ddk/scsi.h winsup/w32api/include/ddk/scsiscan.h winsup/w32api/include/ddk/scsiwmi.h winsup/w32api/include/ddk/smbus.h winsup/w32api/include/ddk/srb.h winsup/w32api/include/ddk/storport.h winsup/w32api/include/ddk/tdi.h winsup/w32api/include/ddk/tdiinfo.h winsup/w32api/include/ddk/tdikrnl.h winsup/w32api/include/ddk/tdistat.h winsup/w32api/include/ddk/tvout.h winsup/w32api/include/ddk/upssvc.h winsup/w32api/include/ddk/usb.h winsup/w32api/include/ddk/usb100.h winsup/w32api/include/ddk/usbcamdi.h winsup/w32api/include/ddk/usbdi.h winsup/w32api/include/ddk/usbioctl.h winsup/w32api/include/ddk/usbiodef.h winsup/w32api/include/ddk/usbscan.h winsup/w32api/include/ddk/usbuser.h winsup/w32api/include/ddk/video.h winsup/w32api/include/ddk/videoagp.h winsup/w32api/include/ddk/win2k.h winsup/w32api/include/ddk/winddi.h winsup/w32api/include/ddk/winddk.h winsup/w32api/include/ddk/winnt4.h winsup/w32api/include/ddk/winxp.h winsup/w32api/include/ddk/ws2san.h winsup/w32api/include/ddk/xfilter.h winsup/w32api/include/devguid.h winsup/w32api/include/dhcpcsdk.h winsup/w32api/include/directx/d3d9.h winsup/w32api/include/directx/d3d9caps.h winsup/w32api/include/directx/d3d9types.h winsup/w32api/include/directx/dxerr8.h winsup/w32api/include/directx/dxerr9.h winsup/w32api/include/dlgs.h winsup/w32api/include/docobj.h winsup/w32api/include/dsadmin.h winsup/w32api/include/dsclient.h winsup/w32api/include/dsgetdc.h winsup/w32api/include/dshow.h winsup/w32api/include/dsquery.h winsup/w32api/include/dsrole.h winsup/w32api/include/dvdevcod.h winsup/w32api/include/dvdmedia.h winsup/w32api/include/edevdefs.h winsup/w32api/include/errorrep.h winsup/w32api/include/errors.h winsup/w32api/include/evcode.h winsup/w32api/include/exdisp.h winsup/w32api/include/exdispid.h winsup/w32api/include/fltdefs.h winsup/w32api/include/httpext.h winsup/w32api/include/icm.h winsup/w32api/include/idispids.h winsup/w32api/include/il21dec.h winsup/w32api/include/imagehlp.h winsup/w32api/include/imm.h winsup/w32api/include/initguid.h winsup/w32api/include/intshcut.h winsup/w32api/include/ipexport.h winsup/w32api/include/iphlpapi.h winsup/w32api/include/ipifcons.h winsup/w32api/include/ipinfoid.h winsup/w32api/include/iprtrmib.h winsup/w32api/include/iptypes.h winsup/w32api/include/ipxconst.h winsup/w32api/include/ipxrtdef.h winsup/w32api/include/ipxtfflt.h winsup/w32api/include/isguids.h winsup/w32api/include/ks.h winsup/w32api/include/ksmedia.h winsup/w32api/include/largeint.h winsup/w32api/include/lm.h winsup/w32api/include/lmaccess.h winsup/w32api/include/lmalert.h winsup/w32api/include/lmapibuf.h winsup/w32api/include/lmat.h winsup/w32api/include/lmaudit.h winsup/w32api/include/lmbrowsr.h winsup/w32api/include/lmchdev.h winsup/w32api/include/lmconfig.h winsup/w32api/include/lmcons.h winsup/w32api/include/lmerr.h winsup/w32api/include/lmerrlog.h winsup/w32api/include/lmmsg.h winsup/w32api/include/lmremutl.h winsup/w32api/include/lmrepl.h winsup/w32api/include/lmserver.h winsup/w32api/include/lmshare.h winsup/w32api/include/lmsname.h winsup/w32api/include/lmstats.h winsup/w32api/include/lmsvc.h winsup/w32api/include/lmuse.h winsup/w32api/include/lmuseflg.h winsup/w32api/include/lmwksta.h winsup/w32api/include/lzexpand.h winsup/w32api/include/mapi.h winsup/w32api/include/mciavi.h winsup/w32api/include/mcx.h winsup/w32api/include/mgm.h winsup/w32api/include/mgmtapi.h winsup/w32api/include/mlang.h winsup/w32api/include/mmreg.h winsup/w32api/include/mmsystem.h winsup/w32api/include/mpegtype.h winsup/w32api/include/mprapi.h winsup/w32api/include/mq.h winsup/w32api/include/msacm.h winsup/w32api/include/mshtml.h winsup/w32api/include/mswsock.h winsup/w32api/include/nb30.h winsup/w32api/include/nddeapi.h winsup/w32api/include/nspapi.h winsup/w32api/include/ntdef.h winsup/w32api/include/ntdll.h winsup/w32api/include/ntdsapi.h winsup/w32api/include/ntdsbcli.h winsup/w32api/include/ntldap.h winsup/w32api/include/ntsecapi.h winsup/w32api/include/ntsecpkg.h winsup/w32api/include/oaidl.h winsup/w32api/include/objbase.h winsup/w32api/include/objfwd.h winsup/w32api/include/objidl.h winsup/w32api/include/objsafe.h winsup/w32api/include/objsel.h winsup/w32api/include/ocidl.h winsup/w32api/include/odbcinst.h winsup/w32api/include/ole.h winsup/w32api/include/ole2.h winsup/w32api/include/ole2ver.h winsup/w32api/include/oleacc.h winsup/w32api/include/oleauto.h winsup/w32api/include/olectl.h winsup/w32api/include/olectlid.h winsup/w32api/include/oledlg.h winsup/w32api/include/oleidl.h winsup/w32api/include/pbt.h winsup/w32api/include/poppack.h winsup/w32api/include/powrprof.h winsup/w32api/include/prsht.h winsup/w32api/include/psapi.h winsup/w32api/include/pshpack1.h winsup/w32api/include/pshpack2.h winsup/w32api/include/pshpack4.h winsup/w32api/include/pshpack8.h winsup/w32api/include/qedit.h winsup/w32api/include/rapi.h winsup/w32api/include/ras.h winsup/w32api/include/rasdlg.h winsup/w32api/include/raserror.h winsup/w32api/include/rassapi.h winsup/w32api/include/reason.h winsup/w32api/include/regstr.h winsup/w32api/include/richedit.h winsup/w32api/include/richole.h winsup/w32api/include/routprot.h winsup/w32api/include/rpc.h winsup/w32api/include/rpcdce.h winsup/w32api/include/rpcdce2.h winsup/w32api/include/rpcdcep.h winsup/w32api/include/rpcndr.h winsup/w32api/include/rpcnsi.h winsup/w32api/include/rpcnsip.h winsup/w32api/include/rpcnterr.h winsup/w32api/include/rpcproxy.h winsup/w32api/include/rtutils.h winsup/w32api/include/schannel.h winsup/w32api/include/schnlsp.h winsup/w32api/include/scrnsave.h winsup/w32api/include/sddl.h winsup/w32api/include/secext.h winsup/w32api/include/security.h winsup/w32api/include/servprov.h winsup/w32api/include/setupapi.h winsup/w32api/include/shellapi.h winsup/w32api/include/shldisp.h winsup/w32api/include/shlguid.h winsup/w32api/include/shlobj.h winsup/w32api/include/shlwapi.h winsup/w32api/include/snmp.h winsup/w32api/include/specstrings.h winsup/w32api/include/sql.h winsup/w32api/include/sqlext.h winsup/w32api/include/sqltypes.h winsup/w32api/include/sqlucode.h winsup/w32api/include/sspi.h winsup/w32api/include/stm.h winsup/w32api/include/strmif.h winsup/w32api/include/subauth.h winsup/w32api/include/svcguid.h winsup/w32api/include/tlhelp32.h winsup/w32api/include/tmschema.h winsup/w32api/include/unknwn.h winsup/w32api/include/userenv.h winsup/w32api/include/usp10.h winsup/w32api/include/uxtheme.h winsup/w32api/include/vfw.h winsup/w32api/include/vidcap.h winsup/w32api/include/vmr9.h winsup/w32api/include/vptype.h winsup/w32api/include/w32api.h winsup/w32api/include/winable.h winsup/w32api/include/winbase.h winsup/w32api/include/winber.h winsup/w32api/include/wincon.h winsup/w32api/include/wincrypt.h winsup/w32api/include/windef.h winsup/w32api/include/windns.h winsup/w32api/include/windows.h winsup/w32api/include/windowsx.h winsup/w32api/include/winerror.h winsup/w32api/include/wingdi.h winsup/w32api/include/wininet.h winsup/w32api/include/winioctl.h winsup/w32api/include/winldap.h winsup/w32api/include/winnetwk.h winsup/w32api/include/winnls.h winsup/w32api/include/winnt.h winsup/w32api/include/winperf.h winsup/w32api/include/winreg.h winsup/w32api/include/winresrc.h winsup/w32api/include/winsnmp.h winsup/w32api/include/winsock.h winsup/w32api/include/winsock2.h winsup/w32api/include/winspool.h winsup/w32api/include/winsvc.h winsup/w32api/include/winuser.h winsup/w32api/include/winver.h winsup/w32api/include/ws2spi.h winsup/w32api/include/ws2tcpip.h winsup/w32api/include/wsahelp.h winsup/w32api/include/wsipx.h winsup/w32api/include/wsnetbs.h winsup/w32api/include/wtsapi32.h winsup/w32api/include/wtypes.h winsup/w32api/include/xprtdefs.h winsup/w32api/include/zmouse.h winsup/w32api/install-sh winsup/w32api/lib/Makefile.in winsup/w32api/lib/aclui.def winsup/w32api/lib/advapi32.def winsup/w32api/lib/ativscp-uuid.c winsup/w32api/lib/avicap32.def winsup/w32api/lib/avifil32.def winsup/w32api/lib/bthprops.def winsup/w32api/lib/cap.def winsup/w32api/lib/cguid-uuid.c winsup/w32api/lib/comcat-uuid.c winsup/w32api/lib/comctl32.def winsup/w32api/lib/comdlg32.def winsup/w32api/lib/crypt32.def winsup/w32api/lib/ctl3d32.def winsup/w32api/lib/ddk/Makefile.in winsup/w32api/lib/ddk/apcups.def winsup/w32api/lib/ddk/cfgmgr32.def winsup/w32api/lib/ddk/dxapi.def winsup/w32api/lib/ddk/hal.def winsup/w32api/lib/ddk/hid.def winsup/w32api/lib/ddk/hidparse.def winsup/w32api/lib/ddk/mcd.def winsup/w32api/lib/ddk/ndis.def winsup/w32api/lib/ddk/newdev.def winsup/w32api/lib/ddk/ntoskrnl.def winsup/w32api/lib/ddk/scsiport.def winsup/w32api/lib/ddk/tdi.def winsup/w32api/lib/ddk/usbcamd.def winsup/w32api/lib/ddk/usbcamd2.def winsup/w32api/lib/ddk/videoprt.def winsup/w32api/lib/ddk/win32k.def winsup/w32api/lib/devguid.c winsup/w32api/lib/dhcpcsvc.def winsup/w32api/lib/directx/Makefile.in winsup/w32api/lib/directx/d3d8.def winsup/w32api/lib/directx/d3d9.def winsup/w32api/lib/directx/d3dim.def winsup/w32api/lib/directx/d3drm.def winsup/w32api/lib/directx/d3dx8d.def winsup/w32api/lib/directx/d3dx9d.def winsup/w32api/lib/directx/d3dxof.def winsup/w32api/lib/directx/ddraw.def winsup/w32api/lib/directx/dinput.def winsup/w32api/lib/directx/dinput8.def winsup/w32api/lib/directx/dinput_joy.c winsup/w32api/lib/directx/dinput_joy2.c winsup/w32api/lib/directx/dinput_kbd.c winsup/w32api/lib/directx/dinput_mouse.c winsup/w32api/lib/directx/dinput_mouse2.c winsup/w32api/lib/directx/dinput_private.h winsup/w32api/lib/directx/dmoguids.c winsup/w32api/lib/directx/dplayx.def winsup/w32api/lib/directx/dpnaddr.def winsup/w32api/lib/directx/dpnet.def winsup/w32api/lib/directx/dpnlobby.def winsup/w32api/lib/directx/dpvoice.def winsup/w32api/lib/directx/dsetup.def winsup/w32api/lib/directx/dsound.def winsup/w32api/lib/directx/dxerr.c winsup/w32api/lib/directx/dxerr8.c winsup/w32api/lib/directx/dxerr8w.c winsup/w32api/lib/directx/dxerr9.c winsup/w32api/lib/directx/dxerr9w.c winsup/w32api/lib/directx/dxguid.c winsup/w32api/lib/directx/ksproxy.def winsup/w32api/lib/directx/ksuser.c winsup/w32api/lib/directx/ksuser.def winsup/w32api/lib/directx/msdmo.def winsup/w32api/lib/directx/strmiids.c winsup/w32api/lib/directx/test.c winsup/w32api/lib/dlcapi.def winsup/w32api/lib/dnsapi.def winsup/w32api/lib/docobj-uuid.c winsup/w32api/lib/exdisp-uuid.c winsup/w32api/lib/extras-uuid.c winsup/w32api/lib/faultrep.def winsup/w32api/lib/gdi32.def winsup/w32api/lib/glaux.def winsup/w32api/lib/glu32.def winsup/w32api/lib/glut.def winsup/w32api/lib/glut32.def winsup/w32api/lib/hlguids-uuid.c winsup/w32api/lib/hlink-uuid.c winsup/w32api/lib/icmui.def winsup/w32api/lib/igmpagnt.def winsup/w32api/lib/imagehlp.def winsup/w32api/lib/imm32.def winsup/w32api/lib/iphlpapi.def winsup/w32api/lib/kernel32.def winsup/w32api/lib/largeint.c winsup/w32api/lib/lz32.def winsup/w32api/lib/mapi32.def winsup/w32api/lib/mfcuia32.def winsup/w32api/lib/mgmtapi.def winsup/w32api/lib/mlang-uuid.c winsup/w32api/lib/mpr.def winsup/w32api/lib/mprapi.def winsup/w32api/lib/mqrt.def winsup/w32api/lib/msacm32.def winsup/w32api/lib/mscms.def winsup/w32api/lib/mshtml-uuid.c winsup/w32api/lib/msimg32.def winsup/w32api/lib/msvcp60.def winsup/w32api/lib/msvfw32.def winsup/w32api/lib/mswsock.def winsup/w32api/lib/msxml-uuid.c winsup/w32api/lib/nddeapi.def winsup/w32api/lib/netapi32.def winsup/w32api/lib/ntdll.def winsup/w32api/lib/oaidl-uuid.c winsup/w32api/lib/objidl-uuid.c winsup/w32api/lib/objsafe-uuid.c winsup/w32api/lib/ocidl-uuid.c winsup/w32api/lib/odbc32.def winsup/w32api/lib/odbccp32.def winsup/w32api/lib/ole32.def winsup/w32api/lib/oleacc-uuid.c winsup/w32api/lib/oleacc.def winsup/w32api/lib/oleaut32.def winsup/w32api/lib/olecli32.def winsup/w32api/lib/olectlid-uuid.c winsup/w32api/lib/oledlg.def winsup/w32api/lib/oleidl-uuid.c winsup/w32api/lib/olepro32.def winsup/w32api/lib/olesvr32.def winsup/w32api/lib/opengl32.def winsup/w32api/lib/penwin32.def winsup/w32api/lib/pkpd32.def winsup/w32api/lib/power-uuid.c winsup/w32api/lib/powrprof.def winsup/w32api/lib/psapi.def winsup/w32api/lib/quartz.def winsup/w32api/lib/rapi.def winsup/w32api/lib/rasapi32.def winsup/w32api/lib/rasdlg.def winsup/w32api/lib/res.rc winsup/w32api/lib/rpcdce4.def winsup/w32api/lib/rpcns4.def winsup/w32api/lib/rpcrt4.def winsup/w32api/lib/rtm.def winsup/w32api/lib/rtutils.def winsup/w32api/lib/scrnsave.c winsup/w32api/lib/secur32.def winsup/w32api/lib/servprov-uuid.c winsup/w32api/lib/setupapi.def winsup/w32api/lib/shell32.c winsup/w32api/lib/shell32.def winsup/w32api/lib/shfolder.def winsup/w32api/lib/shlwapi.def winsup/w32api/lib/snmpapi.def winsup/w32api/lib/svrapi.def winsup/w32api/lib/tapi32.def winsup/w32api/lib/test.c winsup/w32api/lib/th32.def winsup/w32api/lib/thunk32.def winsup/w32api/lib/unknwn-uuid.c winsup/w32api/lib/url.def winsup/w32api/lib/urlmon-uuid.c winsup/w32api/lib/user32.def winsup/w32api/lib/userenv.def winsup/w32api/lib/usp10.def winsup/w32api/lib/uxtheme.def winsup/w32api/lib/vdmdbg.def winsup/w32api/lib/version.def winsup/w32api/lib/vfw32.mri winsup/w32api/lib/win32spl.def winsup/w32api/lib/wininet.def winsup/w32api/lib/winmm.def winsup/w32api/lib/winspool.def winsup/w32api/lib/winstrm.def winsup/w32api/lib/wldap32.def winsup/w32api/lib/wow32.def winsup/w32api/lib/ws2_32.c winsup/w32api/lib/ws2_32.def winsup/w32api/lib/wsnmp32.def winsup/w32api/lib/wsock32.def winsup/w32api/lib/wst.def winsup/w32api/lib/wtsapi32.def --- newlib/libm/machine/spu/headers/acos.h | 18 - newlib/libm/machine/spu/headers/acosd2.h | 177 ---------- newlib/libm/machine/spu/headers/acosf.h | 18 - newlib/libm/machine/spu/headers/acosf4.h | 180 ---------- newlib/libm/machine/spu/headers/acosh.h | 16 - newlib/libm/machine/spu/headers/acoshd2.h | 172 ---------- newlib/libm/machine/spu/headers/acoshf.h | 16 - newlib/libm/machine/spu/headers/acoshf4.h | 167 --------- newlib/libm/machine/spu/headers/asin.h | 18 - newlib/libm/machine/spu/headers/asind2.h | 178 ---------- newlib/libm/machine/spu/headers/asinf.h | 18 - newlib/libm/machine/spu/headers/asinf4.h | 156 --------- newlib/libm/machine/spu/headers/asinh.h | 6 - newlib/libm/machine/spu/headers/asinhd2.h | 189 ---------- newlib/libm/machine/spu/headers/asinhf.h | 6 - newlib/libm/machine/spu/headers/asinhf4.h | 180 ---------- newlib/libm/machine/spu/headers/atan.h | 6 - newlib/libm/machine/spu/headers/atan2.h | 6 - newlib/libm/machine/spu/headers/atan2d2.h | 108 ------ newlib/libm/machine/spu/headers/atan2f.h | 6 - newlib/libm/machine/spu/headers/atan2f4.h | 106 ------ newlib/libm/machine/spu/headers/atand2.h | 115 ------- newlib/libm/machine/spu/headers/atanf.h | 112 ------ newlib/libm/machine/spu/headers/atanf4.h | 136 -------- newlib/libm/machine/spu/headers/atanh.h | 18 - newlib/libm/machine/spu/headers/atanhd2.h | 177 ---------- newlib/libm/machine/spu/headers/atanhf.h | 18 - newlib/libm/machine/spu/headers/atanhf4.h | 149 -------- newlib/libm/machine/spu/headers/cbrt.h | 128 ------- newlib/libm/machine/spu/headers/cbrtf.h | 124 ------- newlib/libm/machine/spu/headers/ceil.h | 95 ----- newlib/libm/machine/spu/headers/ceilf.h | 123 ------- newlib/libm/machine/spu/headers/copysign.h | 48 --- newlib/libm/machine/spu/headers/copysignf.h | 48 --- newlib/libm/machine/spu/headers/cos.h | 6 - newlib/libm/machine/spu/headers/cos_sin.h | 216 ------------ newlib/libm/machine/spu/headers/cosd2.h | 109 ------ newlib/libm/machine/spu/headers/cosf.h | 6 - newlib/libm/machine/spu/headers/cosf4.h | 111 ------ newlib/libm/machine/spu/headers/cosh.h | 6 - newlib/libm/machine/spu/headers/coshd2.h | 127 ------- newlib/libm/machine/spu/headers/coshf.h | 6 - newlib/libm/machine/spu/headers/coshf4.h | 112 ------ newlib/libm/machine/spu/headers/divd2.h | 244 ------------- newlib/libm/machine/spu/headers/divf4.h | 172 ---------- .../libm/machine/spu/headers/dom_chkd_less_than.h | 59 ---- .../libm/machine/spu/headers/dom_chkd_negone_one.h | 69 ---- .../libm/machine/spu/headers/dom_chkf_less_than.h | 59 ---- .../libm/machine/spu/headers/dom_chkf_negone_one.h | 69 ---- newlib/libm/machine/spu/headers/erf.h | 6 - newlib/libm/machine/spu/headers/erf_utils.h | 381 --------------------- newlib/libm/machine/spu/headers/erfc.h | 6 - newlib/libm/machine/spu/headers/erfcd2.h | 150 -------- newlib/libm/machine/spu/headers/erfcf.h | 6 - newlib/libm/machine/spu/headers/erfcf4.h | 133 ------- newlib/libm/machine/spu/headers/erfd2.h | 146 -------- newlib/libm/machine/spu/headers/erff.h | 6 - newlib/libm/machine/spu/headers/erff4.h | 132 ------- newlib/libm/machine/spu/headers/exp.h | 6 - newlib/libm/machine/spu/headers/exp2.h | 6 - newlib/libm/machine/spu/headers/exp2d2.h | 164 --------- newlib/libm/machine/spu/headers/exp2f.h | 124 ------- newlib/libm/machine/spu/headers/exp2f4.h | 146 -------- newlib/libm/machine/spu/headers/expd2.h | 165 --------- newlib/libm/machine/spu/headers/expf.h | 58 ---- newlib/libm/machine/spu/headers/expf4.h | 124 ------- newlib/libm/machine/spu/headers/expm1.h | 6 - newlib/libm/machine/spu/headers/expm1d2.h | 147 -------- newlib/libm/machine/spu/headers/expm1f.h | 6 - newlib/libm/machine/spu/headers/expm1f4.h | 130 ------- newlib/libm/machine/spu/headers/fabs.h | 58 ---- newlib/libm/machine/spu/headers/fabsf.h | 60 ---- newlib/libm/machine/spu/headers/fdim.h | 52 --- newlib/libm/machine/spu/headers/fdimf.h | 49 --- newlib/libm/machine/spu/headers/feclearexcept.h | 51 --- newlib/libm/machine/spu/headers/fefpscr.h | 79 ----- newlib/libm/machine/spu/headers/fegetenv.h | 48 --- newlib/libm/machine/spu/headers/fegetexceptflag.h | 49 --- newlib/libm/machine/spu/headers/fegetround.h | 46 --- newlib/libm/machine/spu/headers/feholdexcept.h | 52 --- newlib/libm/machine/spu/headers/feraiseexcept.h | 51 --- newlib/libm/machine/spu/headers/fesetenv.h | 48 --- newlib/libm/machine/spu/headers/fesetexceptflag.h | 52 --- newlib/libm/machine/spu/headers/fesetround.h | 104 ------ newlib/libm/machine/spu/headers/fetestexcept.h | 49 --- newlib/libm/machine/spu/headers/feupdateenv.h | 48 --- newlib/libm/machine/spu/headers/floor.h | 94 ----- newlib/libm/machine/spu/headers/floord2.h | 122 ------- newlib/libm/machine/spu/headers/floorf.h | 123 ------- newlib/libm/machine/spu/headers/floorf4.h | 117 ------- newlib/libm/machine/spu/headers/fma.h | 49 --- newlib/libm/machine/spu/headers/fmaf.h | 43 --- newlib/libm/machine/spu/headers/fmax.h | 75 ---- newlib/libm/machine/spu/headers/fmaxf.h | 48 --- newlib/libm/machine/spu/headers/fmin.h | 75 ---- newlib/libm/machine/spu/headers/fminf.h | 48 --- newlib/libm/machine/spu/headers/fmod.h | 166 --------- newlib/libm/machine/spu/headers/fmodf.h | 170 --------- newlib/libm/machine/spu/headers/frexp.h | 74 ---- newlib/libm/machine/spu/headers/frexpf.h | 69 ---- newlib/libm/machine/spu/headers/hypot.h | 6 - newlib/libm/machine/spu/headers/hypotd2.h | 134 -------- newlib/libm/machine/spu/headers/hypotf.h | 6 - newlib/libm/machine/spu/headers/hypotf4.h | 139 -------- newlib/libm/machine/spu/headers/ilogb.h | 86 ----- newlib/libm/machine/spu/headers/ilogbf.h | 53 --- newlib/libm/machine/spu/headers/isnan.h | 6 - newlib/libm/machine/spu/headers/isnand2.h | 114 ------ newlib/libm/machine/spu/headers/isnanf.h | 6 - newlib/libm/machine/spu/headers/isnanf4.h | 78 ----- newlib/libm/machine/spu/headers/ldexp.h | 83 ----- newlib/libm/machine/spu/headers/ldexpd2.h | 114 ------ newlib/libm/machine/spu/headers/ldexpf.h | 77 ----- newlib/libm/machine/spu/headers/ldexpf4.h | 84 ----- newlib/libm/machine/spu/headers/lgamma.h | 6 - newlib/libm/machine/spu/headers/lgammad2.h | 330 ------------------ newlib/libm/machine/spu/headers/lgammaf.h | 6 - newlib/libm/machine/spu/headers/lgammaf4.h | 232 ------------- newlib/libm/machine/spu/headers/llrint.h | 85 ----- newlib/libm/machine/spu/headers/llrintf.h | 80 ----- newlib/libm/machine/spu/headers/llround.h | 85 ----- newlib/libm/machine/spu/headers/llroundf.h | 87 ----- newlib/libm/machine/spu/headers/log.h | 16 - newlib/libm/machine/spu/headers/log10.h | 16 - newlib/libm/machine/spu/headers/log10d2.h | 79 ----- newlib/libm/machine/spu/headers/log10f.h | 54 --- newlib/libm/machine/spu/headers/log1p.h | 16 - newlib/libm/machine/spu/headers/log1pd2.h | 137 -------- newlib/libm/machine/spu/headers/log1pf.h | 16 - newlib/libm/machine/spu/headers/log1pf4.h | 124 ------- newlib/libm/machine/spu/headers/log2.h | 16 - newlib/libm/machine/spu/headers/log2d2.h | 145 -------- newlib/libm/machine/spu/headers/log2f.h | 124 ------- newlib/libm/machine/spu/headers/log2f4.h | 136 -------- newlib/libm/machine/spu/headers/logbf.h | 6 - newlib/libm/machine/spu/headers/logbf4.h | 111 ------ newlib/libm/machine/spu/headers/logd2.h | 79 ----- newlib/libm/machine/spu/headers/logf.h | 54 --- newlib/libm/machine/spu/headers/logf4.h | 76 ---- newlib/libm/machine/spu/headers/lrint.h | 63 ---- newlib/libm/machine/spu/headers/lrintf.h | 46 --- newlib/libm/machine/spu/headers/lround.h | 84 ----- newlib/libm/machine/spu/headers/lroundf.h | 56 --- newlib/libm/machine/spu/headers/nearbyint.h | 64 ---- newlib/libm/machine/spu/headers/nearbyintf.h | 6 - newlib/libm/machine/spu/headers/nearbyintf4.h | 74 ---- newlib/libm/machine/spu/headers/nextafter.h | 6 - newlib/libm/machine/spu/headers/nextafterd2.h | 124 ------- newlib/libm/machine/spu/headers/nextafterf.h | 6 - newlib/libm/machine/spu/headers/nextafterf4.h | 120 ------- newlib/libm/machine/spu/headers/pow.h | 6 - newlib/libm/machine/spu/headers/powd2.h | 133 ------- newlib/libm/machine/spu/headers/powf.h | 6 - newlib/libm/machine/spu/headers/powf4.h | 132 ------- newlib/libm/machine/spu/headers/recipd2.h | 114 ------ newlib/libm/machine/spu/headers/recipf4.h | 154 --------- newlib/libm/machine/spu/headers/remainder.h | 192 ----------- newlib/libm/machine/spu/headers/remainderf.h | 141 -------- newlib/libm/machine/spu/headers/remquo.h | 239 ------------- newlib/libm/machine/spu/headers/remquof.h | 178 ---------- newlib/libm/machine/spu/headers/rint.h | 59 ---- newlib/libm/machine/spu/headers/rintf.h | 6 - newlib/libm/machine/spu/headers/rintf4.h | 74 ---- newlib/libm/machine/spu/headers/round.h | 85 ----- newlib/libm/machine/spu/headers/roundf.h | 72 ---- newlib/libm/machine/spu/headers/scalbn.h | 82 ----- newlib/libm/machine/spu/headers/scalbnf.h | 77 ----- newlib/libm/machine/spu/headers/scalbnf4.h | 113 ------ newlib/libm/machine/spu/headers/signbit.h | 6 - newlib/libm/machine/spu/headers/signbitd2.h | 86 ----- newlib/libm/machine/spu/headers/simdmath.h | 278 --------------- newlib/libm/machine/spu/headers/sin.h | 6 - newlib/libm/machine/spu/headers/sincos.h | 10 - newlib/libm/machine/spu/headers/sincosd2.h | 105 ------ newlib/libm/machine/spu/headers/sincosf.h | 10 - newlib/libm/machine/spu/headers/sincosf4.h | 100 ------ newlib/libm/machine/spu/headers/sind2.h | 110 ------ newlib/libm/machine/spu/headers/sinf.h | 6 - newlib/libm/machine/spu/headers/sinf4.h | 107 ------ newlib/libm/machine/spu/headers/sinh.h | 6 - newlib/libm/machine/spu/headers/sinhd2.h | 133 ------- newlib/libm/machine/spu/headers/sinhf.h | 6 - newlib/libm/machine/spu/headers/sinhf4.h | 116 ------- newlib/libm/machine/spu/headers/sqrt.h | 134 -------- newlib/libm/machine/spu/headers/sqrtd2.h | 162 --------- newlib/libm/machine/spu/headers/sqrtf.h | 16 - newlib/libm/machine/spu/headers/sqrtf4.h | 128 ------- newlib/libm/machine/spu/headers/tan.h | 6 - newlib/libm/machine/spu/headers/tand2.h | 117 ------- newlib/libm/machine/spu/headers/tanf.h | 6 - newlib/libm/machine/spu/headers/tanf4.h | 112 ------ newlib/libm/machine/spu/headers/tanh.h | 6 - newlib/libm/machine/spu/headers/tanhd2.h | 173 ---------- newlib/libm/machine/spu/headers/tanhf.h | 6 - newlib/libm/machine/spu/headers/tanhf4.h | 147 -------- newlib/libm/machine/spu/headers/tgamma.h | 30 -- newlib/libm/machine/spu/headers/tgammad2.h | 301 ---------------- newlib/libm/machine/spu/headers/tgammaf.h | 29 -- newlib/libm/machine/spu/headers/tgammaf4.h | 241 ------------- newlib/libm/machine/spu/headers/trunc.h | 70 ---- newlib/libm/machine/spu/headers/truncd2.h | 98 ------ newlib/libm/machine/spu/headers/truncf.h | 64 ---- newlib/libm/machine/spu/headers/truncf4.h | 91 ----- newlib/libm/machine/spu/headers/vec_literal.h | 93 ----- 204 files changed, 17355 deletions(-) delete mode 100644 newlib/libm/machine/spu/headers/acos.h delete mode 100644 newlib/libm/machine/spu/headers/acosd2.h delete mode 100644 newlib/libm/machine/spu/headers/acosf.h delete mode 100644 newlib/libm/machine/spu/headers/acosf4.h delete mode 100644 newlib/libm/machine/spu/headers/acosh.h delete mode 100644 newlib/libm/machine/spu/headers/acoshd2.h delete mode 100644 newlib/libm/machine/spu/headers/acoshf.h delete mode 100644 newlib/libm/machine/spu/headers/acoshf4.h delete mode 100644 newlib/libm/machine/spu/headers/asin.h delete mode 100644 newlib/libm/machine/spu/headers/asind2.h delete mode 100644 newlib/libm/machine/spu/headers/asinf.h delete mode 100644 newlib/libm/machine/spu/headers/asinf4.h delete mode 100644 newlib/libm/machine/spu/headers/asinh.h delete mode 100644 newlib/libm/machine/spu/headers/asinhd2.h delete mode 100644 newlib/libm/machine/spu/headers/asinhf.h delete mode 100644 newlib/libm/machine/spu/headers/asinhf4.h delete mode 100644 newlib/libm/machine/spu/headers/atan.h delete mode 100644 newlib/libm/machine/spu/headers/atan2.h delete mode 100644 newlib/libm/machine/spu/headers/atan2d2.h delete mode 100644 newlib/libm/machine/spu/headers/atan2f.h delete mode 100644 newlib/libm/machine/spu/headers/atan2f4.h delete mode 100644 newlib/libm/machine/spu/headers/atand2.h delete mode 100644 newlib/libm/machine/spu/headers/atanf.h delete mode 100644 newlib/libm/machine/spu/headers/atanf4.h delete mode 100644 newlib/libm/machine/spu/headers/atanh.h delete mode 100644 newlib/libm/machine/spu/headers/atanhd2.h delete mode 100644 newlib/libm/machine/spu/headers/atanhf.h delete mode 100644 newlib/libm/machine/spu/headers/atanhf4.h delete mode 100644 newlib/libm/machine/spu/headers/cbrt.h delete mode 100644 newlib/libm/machine/spu/headers/cbrtf.h delete mode 100644 newlib/libm/machine/spu/headers/ceil.h delete mode 100644 newlib/libm/machine/spu/headers/ceilf.h delete mode 100644 newlib/libm/machine/spu/headers/copysign.h delete mode 100644 newlib/libm/machine/spu/headers/copysignf.h delete mode 100644 newlib/libm/machine/spu/headers/cos.h delete mode 100644 newlib/libm/machine/spu/headers/cos_sin.h delete mode 100644 newlib/libm/machine/spu/headers/cosd2.h delete mode 100644 newlib/libm/machine/spu/headers/cosf.h delete mode 100644 newlib/libm/machine/spu/headers/cosf4.h delete mode 100644 newlib/libm/machine/spu/headers/cosh.h delete mode 100644 newlib/libm/machine/spu/headers/coshd2.h delete mode 100644 newlib/libm/machine/spu/headers/coshf.h delete mode 100644 newlib/libm/machine/spu/headers/coshf4.h delete mode 100644 newlib/libm/machine/spu/headers/divd2.h delete mode 100644 newlib/libm/machine/spu/headers/divf4.h delete mode 100644 newlib/libm/machine/spu/headers/dom_chkd_less_than.h delete mode 100644 newlib/libm/machine/spu/headers/dom_chkd_negone_one.h delete mode 100644 newlib/libm/machine/spu/headers/dom_chkf_less_than.h delete mode 100644 newlib/libm/machine/spu/headers/dom_chkf_negone_one.h delete mode 100644 newlib/libm/machine/spu/headers/erf.h delete mode 100644 newlib/libm/machine/spu/headers/erf_utils.h delete mode 100644 newlib/libm/machine/spu/headers/erfc.h delete mode 100644 newlib/libm/machine/spu/headers/erfcd2.h delete mode 100644 newlib/libm/machine/spu/headers/erfcf.h delete mode 100644 newlib/libm/machine/spu/headers/erfcf4.h delete mode 100644 newlib/libm/machine/spu/headers/erfd2.h delete mode 100644 newlib/libm/machine/spu/headers/erff.h delete mode 100644 newlib/libm/machine/spu/headers/erff4.h delete mode 100644 newlib/libm/machine/spu/headers/exp.h delete mode 100644 newlib/libm/machine/spu/headers/exp2.h delete mode 100644 newlib/libm/machine/spu/headers/exp2d2.h delete mode 100644 newlib/libm/machine/spu/headers/exp2f.h delete mode 100644 newlib/libm/machine/spu/headers/exp2f4.h delete mode 100644 newlib/libm/machine/spu/headers/expd2.h delete mode 100644 newlib/libm/machine/spu/headers/expf.h delete mode 100644 newlib/libm/machine/spu/headers/expf4.h delete mode 100644 newlib/libm/machine/spu/headers/expm1.h delete mode 100644 newlib/libm/machine/spu/headers/expm1d2.h delete mode 100644 newlib/libm/machine/spu/headers/expm1f.h delete mode 100644 newlib/libm/machine/spu/headers/expm1f4.h delete mode 100644 newlib/libm/machine/spu/headers/fabs.h delete mode 100644 newlib/libm/machine/spu/headers/fabsf.h delete mode 100644 newlib/libm/machine/spu/headers/fdim.h delete mode 100644 newlib/libm/machine/spu/headers/fdimf.h delete mode 100644 newlib/libm/machine/spu/headers/feclearexcept.h delete mode 100644 newlib/libm/machine/spu/headers/fefpscr.h delete mode 100644 newlib/libm/machine/spu/headers/fegetenv.h delete mode 100644 newlib/libm/machine/spu/headers/fegetexceptflag.h delete mode 100644 newlib/libm/machine/spu/headers/fegetround.h delete mode 100644 newlib/libm/machine/spu/headers/feholdexcept.h delete mode 100644 newlib/libm/machine/spu/headers/feraiseexcept.h delete mode 100644 newlib/libm/machine/spu/headers/fesetenv.h delete mode 100644 newlib/libm/machine/spu/headers/fesetexceptflag.h delete mode 100644 newlib/libm/machine/spu/headers/fesetround.h delete mode 100644 newlib/libm/machine/spu/headers/fetestexcept.h delete mode 100644 newlib/libm/machine/spu/headers/feupdateenv.h delete mode 100644 newlib/libm/machine/spu/headers/floor.h delete mode 100644 newlib/libm/machine/spu/headers/floord2.h delete mode 100644 newlib/libm/machine/spu/headers/floorf.h delete mode 100644 newlib/libm/machine/spu/headers/floorf4.h delete mode 100644 newlib/libm/machine/spu/headers/fma.h delete mode 100644 newlib/libm/machine/spu/headers/fmaf.h delete mode 100644 newlib/libm/machine/spu/headers/fmax.h delete mode 100644 newlib/libm/machine/spu/headers/fmaxf.h delete mode 100644 newlib/libm/machine/spu/headers/fmin.h delete mode 100644 newlib/libm/machine/spu/headers/fminf.h delete mode 100644 newlib/libm/machine/spu/headers/fmod.h delete mode 100644 newlib/libm/machine/spu/headers/fmodf.h delete mode 100644 newlib/libm/machine/spu/headers/frexp.h delete mode 100644 newlib/libm/machine/spu/headers/frexpf.h delete mode 100644 newlib/libm/machine/spu/headers/hypot.h delete mode 100644 newlib/libm/machine/spu/headers/hypotd2.h delete mode 100644 newlib/libm/machine/spu/headers/hypotf.h delete mode 100644 newlib/libm/machine/spu/headers/hypotf4.h delete mode 100644 newlib/libm/machine/spu/headers/ilogb.h delete mode 100644 newlib/libm/machine/spu/headers/ilogbf.h delete mode 100644 newlib/libm/machine/spu/headers/isnan.h delete mode 100644 newlib/libm/machine/spu/headers/isnand2.h delete mode 100644 newlib/libm/machine/spu/headers/isnanf.h delete mode 100644 newlib/libm/machine/spu/headers/isnanf4.h delete mode 100644 newlib/libm/machine/spu/headers/ldexp.h delete mode 100644 newlib/libm/machine/spu/headers/ldexpd2.h delete mode 100644 newlib/libm/machine/spu/headers/ldexpf.h delete mode 100644 newlib/libm/machine/spu/headers/ldexpf4.h delete mode 100644 newlib/libm/machine/spu/headers/lgamma.h delete mode 100644 newlib/libm/machine/spu/headers/lgammad2.h delete mode 100644 newlib/libm/machine/spu/headers/lgammaf.h delete mode 100644 newlib/libm/machine/spu/headers/lgammaf4.h delete mode 100644 newlib/libm/machine/spu/headers/llrint.h delete mode 100644 newlib/libm/machine/spu/headers/llrintf.h delete mode 100644 newlib/libm/machine/spu/headers/llround.h delete mode 100644 newlib/libm/machine/spu/headers/llroundf.h delete mode 100644 newlib/libm/machine/spu/headers/log.h delete mode 100644 newlib/libm/machine/spu/headers/log10.h delete mode 100644 newlib/libm/machine/spu/headers/log10d2.h delete mode 100644 newlib/libm/machine/spu/headers/log10f.h delete mode 100644 newlib/libm/machine/spu/headers/log1p.h delete mode 100644 newlib/libm/machine/spu/headers/log1pd2.h delete mode 100644 newlib/libm/machine/spu/headers/log1pf.h delete mode 100644 newlib/libm/machine/spu/headers/log1pf4.h delete mode 100644 newlib/libm/machine/spu/headers/log2.h delete mode 100644 newlib/libm/machine/spu/headers/log2d2.h delete mode 100644 newlib/libm/machine/spu/headers/log2f.h delete mode 100644 newlib/libm/machine/spu/headers/log2f4.h delete mode 100644 newlib/libm/machine/spu/headers/logbf.h delete mode 100644 newlib/libm/machine/spu/headers/logbf4.h delete mode 100644 newlib/libm/machine/spu/headers/logd2.h delete mode 100644 newlib/libm/machine/spu/headers/logf.h delete mode 100644 newlib/libm/machine/spu/headers/logf4.h delete mode 100644 newlib/libm/machine/spu/headers/lrint.h delete mode 100644 newlib/libm/machine/spu/headers/lrintf.h delete mode 100644 newlib/libm/machine/spu/headers/lround.h delete mode 100644 newlib/libm/machine/spu/headers/lroundf.h delete mode 100644 newlib/libm/machine/spu/headers/nearbyint.h delete mode 100644 newlib/libm/machine/spu/headers/nearbyintf.h delete mode 100644 newlib/libm/machine/spu/headers/nearbyintf4.h delete mode 100644 newlib/libm/machine/spu/headers/nextafter.h delete mode 100644 newlib/libm/machine/spu/headers/nextafterd2.h delete mode 100644 newlib/libm/machine/spu/headers/nextafterf.h delete mode 100644 newlib/libm/machine/spu/headers/nextafterf4.h delete mode 100644 newlib/libm/machine/spu/headers/pow.h delete mode 100644 newlib/libm/machine/spu/headers/powd2.h delete mode 100644 newlib/libm/machine/spu/headers/powf.h delete mode 100644 newlib/libm/machine/spu/headers/powf4.h delete mode 100644 newlib/libm/machine/spu/headers/recipd2.h delete mode 100644 newlib/libm/machine/spu/headers/recipf4.h delete mode 100644 newlib/libm/machine/spu/headers/remainder.h delete mode 100644 newlib/libm/machine/spu/headers/remainderf.h delete mode 100644 newlib/libm/machine/spu/headers/remquo.h delete mode 100644 newlib/libm/machine/spu/headers/remquof.h delete mode 100644 newlib/libm/machine/spu/headers/rint.h delete mode 100644 newlib/libm/machine/spu/headers/rintf.h delete mode 100644 newlib/libm/machine/spu/headers/rintf4.h delete mode 100644 newlib/libm/machine/spu/headers/round.h delete mode 100644 newlib/libm/machine/spu/headers/roundf.h delete mode 100644 newlib/libm/machine/spu/headers/scalbn.h delete mode 100644 newlib/libm/machine/spu/headers/scalbnf.h delete mode 100644 newlib/libm/machine/spu/headers/scalbnf4.h delete mode 100644 newlib/libm/machine/spu/headers/signbit.h delete mode 100644 newlib/libm/machine/spu/headers/signbitd2.h delete mode 100644 newlib/libm/machine/spu/headers/simdmath.h delete mode 100644 newlib/libm/machine/spu/headers/sin.h delete mode 100644 newlib/libm/machine/spu/headers/sincos.h delete mode 100644 newlib/libm/machine/spu/headers/sincosd2.h delete mode 100644 newlib/libm/machine/spu/headers/sincosf.h delete mode 100644 newlib/libm/machine/spu/headers/sincosf4.h delete mode 100644 newlib/libm/machine/spu/headers/sind2.h delete mode 100644 newlib/libm/machine/spu/headers/sinf.h delete mode 100644 newlib/libm/machine/spu/headers/sinf4.h delete mode 100644 newlib/libm/machine/spu/headers/sinh.h delete mode 100644 newlib/libm/machine/spu/headers/sinhd2.h delete mode 100644 newlib/libm/machine/spu/headers/sinhf.h delete mode 100644 newlib/libm/machine/spu/headers/sinhf4.h delete mode 100644 newlib/libm/machine/spu/headers/sqrt.h delete mode 100644 newlib/libm/machine/spu/headers/sqrtd2.h delete mode 100644 newlib/libm/machine/spu/headers/sqrtf.h delete mode 100644 newlib/libm/machine/spu/headers/sqrtf4.h delete mode 100644 newlib/libm/machine/spu/headers/tan.h delete mode 100644 newlib/libm/machine/spu/headers/tand2.h delete mode 100644 newlib/libm/machine/spu/headers/tanf.h delete mode 100644 newlib/libm/machine/spu/headers/tanf4.h delete mode 100644 newlib/libm/machine/spu/headers/tanh.h delete mode 100644 newlib/libm/machine/spu/headers/tanhd2.h delete mode 100644 newlib/libm/machine/spu/headers/tanhf.h delete mode 100644 newlib/libm/machine/spu/headers/tanhf4.h delete mode 100644 newlib/libm/machine/spu/headers/tgamma.h delete mode 100644 newlib/libm/machine/spu/headers/tgammad2.h delete mode 100644 newlib/libm/machine/spu/headers/tgammaf.h delete mode 100644 newlib/libm/machine/spu/headers/tgammaf4.h delete mode 100644 newlib/libm/machine/spu/headers/trunc.h delete mode 100644 newlib/libm/machine/spu/headers/truncd2.h delete mode 100644 newlib/libm/machine/spu/headers/truncf.h delete mode 100644 newlib/libm/machine/spu/headers/truncf4.h delete mode 100644 newlib/libm/machine/spu/headers/vec_literal.h (limited to 'newlib/libm/machine/spu/headers') diff --git a/newlib/libm/machine/spu/headers/acos.h b/newlib/libm/machine/spu/headers/acos.h deleted file mode 100644 index feec8c329..000000000 --- a/newlib/libm/machine/spu/headers/acos.h +++ /dev/null @@ -1,18 +0,0 @@ -#include "headers/acosd2.h" -#include "headers/dom_chkd_negone_one.h" - -static __inline double _acos(double x) -{ - double res; - vector double vx; - - vx = spu_splats(x); - res = spu_extract(_acosd2(vx), 0); -#ifndef _IEEE_LIBM - /* - * Domain error if not in the interval [-1, +1] - */ - dom_chkd_negone_one(vx); -#endif - return res; -} diff --git a/newlib/libm/machine/spu/headers/acosd2.h b/newlib/libm/machine/spu/headers/acosd2.h deleted file mode 100644 index 8c8095564..000000000 --- a/newlib/libm/machine/spu/headers/acosd2.h +++ /dev/null @@ -1,177 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ - -#ifndef _ACOSD2_H_ -#define _ACOSD2_H_ 1 - -#include - -#include "simdmath.h" -#include "sqrtd2.h" -#include "divd2.h" - -/* - * FUNCTION - * vector double _acosd2(vector double x) - * - * DESCRIPTION - * Compute the arc cosine of the vector of double precision elements - * specified by x, returning the resulting angles in radians. The input - * elements are to be in the closed interval [-1, 1]. Values outside - * this range result in a invalid operation execption being latched in - * the FPSCR register and a NAN is returned. - * - * The basic algorithm computes the arc cosine using PI/2 - asind2(x). - * However, as |x| approaches 1, there is a cancellation error in - * subtracting asind2(x) from PI/2, so we simplify the evaluation - * instead of layering acosd2 on top of asind2. - * - * This yields the basic algorithm of: - * - * absx = (x < 0.0) ? -x : x; - * - * if (absx > 0.5) { - * if (x < 0) { - * addend = SM_PI; - * multiplier = -2.0; - * } else { - * addend = 0.0; - * multiplier = 2.0; - * } - * - * x = sqrt(-0.5 * absx + 0.5); - * } else { - * addend = SM_PI_2; - * multiplier = -1.0; - * } - * - * x2 = x * x; - * x3 = x2 * x; - * - * p = ((((P5 * x2 + P4)*x2 + P3)*x2 + P2)*x2 + P1)*x2 + P0; - * - * q = ((((Q5 * x2 + Q4)*x2 + Q3)*x2 + Q2)*x2 + Q1)*x2 + Q0;; - * - * pq = p / q; - * - * result = (x3*pq + x)*multiplier - addend; - * - * Where P5-P0 and Q5-Q0 are the polynomial coeficients. See asind2 - * for additional details. - */ -static __inline vector double _acosd2(vector double x) -{ - vec_uint4 x_gt_half, x_eq_half; - vec_double2 x_neg; // input x is negative - vec_double2 x_abs; // absolute value of x - vec_double2 x_trans; // transformed x when |x| > 0.5 - vec_double2 x2, x3; // x squared and x cubed, respectively. - vec_double2 result; - vec_double2 multiplier, addend; - vec_double2 p, q, pq; - vec_double2 half = spu_splats(0.5); - vec_double2 sign = (vec_double2)spu_splats(0x8000000000000000ULL); - vec_uchar16 splat_hi = ((vec_uchar16){0,1,2,3, 0,1,2,3, 8,9,10,11, 8,9,10,11}); - - // Compute the absolute value of x - x_abs = spu_andc(x, sign); - - // Perform transformation for the case where |x| > 0.5. We rely on - // sqrtd2 producing a NAN is |x| > 1.0. - x_trans = _sqrtd2(spu_nmsub(x_abs, half, half)); - - // Determine the correct addend and multiplier. - x_neg = (vec_double2)spu_rlmaska((vec_int4)spu_shuffle(x, x, splat_hi), -31); - - x_gt_half = spu_cmpgt((vec_uint4)x_abs, (vec_uint4)half); - x_eq_half = spu_cmpeq((vec_uint4)x_abs, (vec_uint4)half); - x_gt_half = spu_or(x_gt_half, spu_and(x_eq_half, spu_rlqwbyte(x_gt_half, 4))); - x_gt_half = spu_shuffle(x_gt_half, x_gt_half, splat_hi); - - addend = spu_sel(spu_splats(SM_PI_2), spu_and(spu_splats(SM_PI), x_neg), (vec_ullong2)x_gt_half); - - multiplier = spu_sel(spu_splats(-1.0), spu_sel(spu_splats(2.0), x, (vec_ullong2)sign), (vec_ullong2)x_gt_half); - - // Select whether to use the x or the transformed x for the polygon evaluation. - // if |x| > 0.5 use x_trans - // else use x - - x = spu_sel(x, x_trans, (vec_ullong2)x_gt_half); - - // Compute the polynomials. - - x2 = spu_mul(x, x); - x3 = spu_mul(x2, x); - - p = spu_madd(spu_splats(0.004253011369004428248960), x2, spu_splats(-0.6019598008014123785661)); - p = spu_madd(p, x2, spu_splats(5.444622390564711410273)); - p = spu_madd(p, x2, spu_splats(-16.26247967210700244449)); - p = spu_madd(p, x2, spu_splats(19.56261983317594739197)); - p = spu_madd(p, x2, spu_splats(-8.198089802484824371615)); - - q = spu_add(x2, spu_splats(-14.74091372988853791896)); - q = spu_madd(q, x2, spu_splats(70.49610280856842141659)); - q = spu_madd(q, x2, spu_splats(-147.1791292232726029859)); - q = spu_madd(q, x2, spu_splats(139.5105614657485689735)); - q = spu_madd(q, x2, spu_splats(-49.18853881490881290097)); - - // Compute the rational solution p/q and final multiplication and addend - // correction. - pq = _divd2(p, q); - - result = spu_madd(spu_madd(x3, pq, x), multiplier, addend); - - return (result); -} - -#endif /* _ACOSD2_H_ */ -#endif /* __SPU__ */ - diff --git a/newlib/libm/machine/spu/headers/acosf.h b/newlib/libm/machine/spu/headers/acosf.h deleted file mode 100644 index 49ab628fc..000000000 --- a/newlib/libm/machine/spu/headers/acosf.h +++ /dev/null @@ -1,18 +0,0 @@ -#include "headers/acosf4.h" -#include "headers/dom_chkf_negone_one.h" - -static __inline float _acosf(float x) -{ - float res; - vector float vx; - - vx = spu_splats(x); - res = spu_extract(_acosf4(vx), 0); -#ifndef _IEEE_LIBM - /* - * Domain error if not in the interval [-1, +1] - */ - dom_chkf_negone_one(vx); -#endif - return res; -} diff --git a/newlib/libm/machine/spu/headers/acosf4.h b/newlib/libm/machine/spu/headers/acosf4.h deleted file mode 100644 index bb4dba658..000000000 --- a/newlib/libm/machine/spu/headers/acosf4.h +++ /dev/null @@ -1,180 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ - -#ifndef _ACOSF4_H_ -#define _ACOSF4_H_ 1 - -#include - -#include "divf4.h" -#include "sqrtf4.h" - -/* - * FUNCTION - * vector float _acosf4(vector float x) - * - * DESCRIPTION - * The _acosf4 function computes the arc cosine for a vector of values x; - * that is the values whose cosine is x. Results are undefined if x is - * outside the range [-1, 1]. - * - * RETURNS - * The _acosf4 function returns the arc cosine in radians and the value is - * mathematically defined to be in the range [0, pi]. - * - */ -static __inline vector float _acosf4(vector float x) -{ - vec_float4 zero = spu_splats(0.0f); - vec_float4 half = spu_splats(0.5f); - vec_float4 one = spu_splats(1.0f); - vec_float4 two = spu_splats(2.0f); - vec_float4 pi = spu_splats(3.1415925026e+00f); - vec_float4 pio2_hi = spu_splats(1.5707962513e+00f); - vec_float4 pio2_lo = spu_splats(7.5497894159e-08f); - - vec_float4 snan = (vec_float4)spu_splats((unsigned int)0x7FC00000); - vec_uint4 denorm_threshold = spu_splats((unsigned int)0x23000000); - vec_uint4 sign_mask = spu_splats((unsigned int)0x80000000); - - - vec_float4 p0 = (vec_float4)spu_splats((unsigned int)0x3E2AAAAB); - vec_float4 p1 = (vec_float4)spu_splats((unsigned int)0xBEA6B090); - vec_float4 p2 = (vec_float4)spu_splats((unsigned int)0x3E4E0AA8); - vec_float4 p3 = (vec_float4)spu_splats((unsigned int)0xBD241146); - vec_float4 p4 = (vec_float4)spu_splats((unsigned int)0x3A4F7F04); - vec_float4 p5 = (vec_float4)spu_splats((unsigned int)0x3811EF08); - - vec_float4 q1 = (vec_float4)spu_splats((unsigned int)0xC019D139); - vec_float4 q2 = (vec_float4)spu_splats((unsigned int)0x4001572D); - vec_float4 q3 = (vec_float4)spu_splats((unsigned int)0xBF303361); - vec_float4 q4 = (vec_float4)spu_splats((unsigned int)0x3D9DC62E); - - - vec_uint4 x_abs = spu_andc((vec_uint4)x,sign_mask); - vec_uint4 x_pos = spu_cmpgt(sign_mask,(vec_uint4)x); - - - vec_uint4 almost_half = spu_splats((unsigned int)0x3EFFFFFF); - vec_uint4 sel0 = spu_nand(spu_splats((unsigned int)0xFFFFFFFF),spu_cmpgt(x_abs,almost_half)); - vec_uint4 sel1 = spu_andc(x_pos,sel0); // pos - - vec_float4 za = spu_sel(spu_sel(spu_add(one,x),spu_sub(one,x),sel1) ,x,sel0); - vec_float4 zb = spu_sel(half,x,sel0); - - vec_float4 z = spu_mul(za,zb); - - vec_float4 p; - p = spu_madd(z,p5,p4); - p = spu_madd(p,z,p3); - p = spu_madd(p,z,p2); - p = spu_madd(p,z,p1); - p = spu_madd(p,z,p0); - p = spu_mul(p,z); - - vec_float4 q; - q = spu_madd(z,q4,q3); - q = spu_madd(q,z,q2); - q = spu_madd(q,z,q1); - q = spu_madd(q,z,one); - - // Only used by secondaries - vec_float4 s = _sqrtf4(z); - - vec_float4 r = _divf4(p,q); - - vec_float4 w1 = spu_msub(r,s,pio2_lo); - - - vec_float4 df = (vec_float4)spu_and((vec_uint4)s,0xFFFFF000); - vec_float4 c = _divf4(spu_nmsub(df,df,z),spu_add(s,df)); - vec_float4 w2 = spu_madd(r,s,c); - - vec_float4 result0 = spu_sub(pio2_hi,spu_sub(x,spu_nmsub(x,r,pio2_lo))); - - - vec_float4 result1 = spu_mul(two,spu_add(df,w2)); - vec_float4 result2 = spu_nmsub(two,spu_add(s,w1),pi); - - - vec_float4 result; - - result = spu_sel(result2,result1,sel1); - result = spu_sel(result,result0,sel0); - - // If |x|==1 then: - // if x == 1, return 0 - // else return pi - - vec_uint4 abs_one = spu_cmpeq(x_abs,(vec_uint4)one); - vec_uint4 out_of_bounds = spu_cmpgt(x_abs,(vec_uint4)one); - vec_uint4 underflow = spu_cmpgt(denorm_threshold,x_abs); - - - - result = spu_sel(result,spu_sel(pi,zero,x_pos),abs_one); - - // If 1 < |x| then return sNaN - result = spu_sel(result,snan,out_of_bounds); - - // If |x| < 2**-57, then return pi/2 (OFF BY 1 ULP) - result = spu_sel(result,spu_add(pio2_hi,pio2_lo),underflow); - - return result; -} - -#endif /* _ACOSF4_H_ */ -#endif /* __SPU__ */ - - diff --git a/newlib/libm/machine/spu/headers/acosh.h b/newlib/libm/machine/spu/headers/acosh.h deleted file mode 100644 index d84708a30..000000000 --- a/newlib/libm/machine/spu/headers/acosh.h +++ /dev/null @@ -1,16 +0,0 @@ -#include "headers/acoshd2.h" -#include "headers/dom_chkd_less_than.h" - -static __inline double _acosh(double x) -{ - double res; - vector double vx; - vector double vc = { 1.0, 1.0 }; - - vx = spu_promote(x, 0); - res = spu_extract(_acoshd2(vx), 0); -#ifndef _IEEE_LIBM - dom_chkd_less_than(vx, vc); -#endif - return res; -} diff --git a/newlib/libm/machine/spu/headers/acoshd2.h b/newlib/libm/machine/spu/headers/acoshd2.h deleted file mode 100644 index b9bfd0cb2..000000000 --- a/newlib/libm/machine/spu/headers/acoshd2.h +++ /dev/null @@ -1,172 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _ACOSHD2_H_ -#define _ACOSHD2_H_ 1 - -#include -#include "logd2.h" -#include "sqrtd2.h" - -/* - * FUNCTION - * vector double _acoshd2(vector double x) - * - * DESCRIPTION - * The acoshd2 function returns a vector containing the hyperbolic - * arccosines of the corresponding elements of the input vector. - * - * We are using the formula: - * acosh = ln(x + sqrt(x^2 - 1)) - * - * For x near one, we use the Taylor series: - * - * infinity - * ------ - * - ' - * - k - * acosh x = - C (x - 1) - * - k - * - , - * ------ - * k = 0 - * - * - * Special Cases: - * - acosh(1) = +0 - * - acosh(NaN) = NaN - * - acosh(Infinity) = Infinity - * - acosh(x < 1) = NaN - * - */ - -/* - * Taylor Series Coefficients - * for x around 1. - */ -#define ACOSH_TAY01 1.0000000000000000000000000000000000000000000000000000000000000000000000E0 /* 1 / 1 */ -#define ACOSH_TAY02 -8.3333333333333333333333333333333333333333333333333333333333333333333333E-2 /* 1 / 12 */ -#define ACOSH_TAY03 1.8750000000000000000000000000000000000000000000000000000000000000000000E-2 /* 3 / 160 */ -#define ACOSH_TAY04 -5.5803571428571428571428571428571428571428571428571428571428571428571429E-3 /* 5 / 896 */ -#define ACOSH_TAY05 1.8988715277777777777777777777777777777777777777777777777777777777777778E-3 /* 35 / 18432 */ -#define ACOSH_TAY06 -6.9912997159090909090909090909090909090909090909090909090909090909090909E-4 /* 63 / 90112 */ -#define ACOSH_TAY07 2.7113694411057692307692307692307692307692307692307692307692307692307692E-4 /* 231 / 851968 */ -#define ACOSH_TAY08 -1.0910034179687500000000000000000000000000000000000000000000000000000000E-4 /* 143 / 1310720 */ -#define ACOSH_TAY09 4.5124222250545726102941176470588235294117647058823529411764705882352941E-5 /* 6435 / 142606336 */ -#define ACOSH_TAY10 -1.9065643611707185444078947368421052631578947368421052631578947368421053E-5 /* 12155 / 637534208 */ -#define ACOSH_TAY11 8.1936873140789213634672619047619047619047619047619047619047619047619048E-6 /* 46189 / 5637144576 */ -#define ACOSH_TAY12 -3.5705692742181860882302989130434782608695652173913043478260869565217391E-6 /* 88179 / 24696061952 */ -#define ACOSH_TAY13 1.5740259550511837005615234375000000000000000000000000000000000000000000E-6 /* 676039 / 429496729600 */ -#define ACOSH_TAY14 -7.0068819224144573564882631655092592592592592592592592592592592592592593E-7 /* 1300075 / 1855425871872 */ -#define ACOSH_TAY15 3.1453306166503321507881427633351293103448275862068965517241379310344828E-7 /* 5014575 / 15942918602752 */ -#if 0 -#define ACOSH_TAY16 -1.4221629293564136230176494967552923387096774193548387096774193548387097E-7 /* 9694845 / 68169720922112 */ -#define ACOSH_TAY17 6.4711106776113328206437555226412686434659090909090909090909090909090909E-8 /* 100180065 / 1548112371908608 */ -#define ACOSH_TAY18 -2.9609409781171182528071637664522443498883928571428571428571428571428571E-8 /* 116680311 / 3940649673949184 */ -#define ACOSH_TAY19 1.3615438056281793767600509061201198680980785472972972972972972972972973E-8 /* 2268783825 / 166633186212708352 */ -#endif - -static __inline vector double _acoshd2(vector double x) -{ - vec_uchar16 dup_even = ((vec_uchar16) { 0,1,2,3, 0,1,2,3, 8,9,10,11, 8,9,10,11 }); - vec_double2 minus_oned = spu_splats(-1.0); - vec_double2 twod = spu_splats(2.0); - vec_double2 xminus1; - vec_float4 xf; - /* Where we switch from taylor to formula */ - vec_float4 switch_approx = spu_splats(1.15f); - vec_uint4 use_form; - vec_double2 result, fresult, mresult;; - - - xf = spu_roundtf(x); - xf = spu_shuffle(xf, xf, dup_even); - - /* - * Formula: - * acosh = ln(x + sqrt(x^2 - 1)) - */ - fresult = _sqrtd2(spu_madd(x, x, minus_oned)); - fresult = spu_add(x, fresult); - fresult = _logd2(fresult); - - /* - * Taylor Series - */ - xminus1 = spu_add(x, minus_oned); - - mresult = spu_madd(xminus1, spu_splats(ACOSH_TAY15), spu_splats(ACOSH_TAY14)); - mresult = spu_madd(xminus1, mresult, spu_splats(ACOSH_TAY13)); - mresult = spu_madd(xminus1, mresult, spu_splats(ACOSH_TAY12)); - mresult = spu_madd(xminus1, mresult, spu_splats(ACOSH_TAY11)); - mresult = spu_madd(xminus1, mresult, spu_splats(ACOSH_TAY10)); - mresult = spu_madd(xminus1, mresult, spu_splats(ACOSH_TAY09)); - mresult = spu_madd(xminus1, mresult, spu_splats(ACOSH_TAY08)); - mresult = spu_madd(xminus1, mresult, spu_splats(ACOSH_TAY07)); - mresult = spu_madd(xminus1, mresult, spu_splats(ACOSH_TAY06)); - mresult = spu_madd(xminus1, mresult, spu_splats(ACOSH_TAY05)); - mresult = spu_madd(xminus1, mresult, spu_splats(ACOSH_TAY04)); - mresult = spu_madd(xminus1, mresult, spu_splats(ACOSH_TAY03)); - mresult = spu_madd(xminus1, mresult, spu_splats(ACOSH_TAY02)); - mresult = spu_madd(xminus1, mresult, spu_splats(ACOSH_TAY01)); - - mresult = spu_mul(mresult, _sqrtd2(spu_mul(xminus1, twod))); - - /* - * Select series or formula - */ - use_form = spu_cmpgt(xf, switch_approx); - result = spu_sel(mresult, fresult, (vec_ullong2)use_form); - - return result; -} - -#endif /* _ACOSHD2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/acoshf.h b/newlib/libm/machine/spu/headers/acoshf.h deleted file mode 100644 index 537706c8a..000000000 --- a/newlib/libm/machine/spu/headers/acoshf.h +++ /dev/null @@ -1,16 +0,0 @@ -#include "headers/acoshf4.h" -#include "headers/dom_chkf_less_than.h" - -static __inline float _acoshf(float x) -{ - float res; - vector float vx; - vector float vc = { 1.0, 1.0, 1.0, 1.0 }; - - vx = spu_promote(x, 0); - res = spu_extract(_acoshf4(vx), 0); -#ifndef _IEEE_LIBM - dom_chkf_less_than(vx, vc); -#endif - return res; -} diff --git a/newlib/libm/machine/spu/headers/acoshf4.h b/newlib/libm/machine/spu/headers/acoshf4.h deleted file mode 100644 index 3efc35ffc..000000000 --- a/newlib/libm/machine/spu/headers/acoshf4.h +++ /dev/null @@ -1,167 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _ACOSHF4_H_ -#define _ACOSHF4_H_ 1 - -#include -#include "logf4.h" -#include "sqrtf4.h" - -/* - * FUNCTION - * vector float _acoshf4(vector float x) - * - * DESCRIPTION - * The acoshf4 function returns a vector containing the hyperbolic - * arccosines of the corresponding elements of the input vector. - * - * We are using the formula: - * acosh = ln(x + sqrt(x^2 - 1)) - * - * For x near one, we use the Taylor series: - * - * infinity - * ------ - * - ' - * - k - * acosh x = - C (x - 1) - * - k - * - , - * ------ - * k = 0 - * - * - * Special Cases: - * - acosh(1) = +0 - * - NaNs and Infinity aren't supported for single-precision on SPU. - * - */ - -/* - * Taylor Series Coefficients - * for x around 1. - */ -#define ACOSH_TAY01 1.0000000000000000000000000000000000000000000000000000000000000000000000E0 /* 1 / 1 */ -#define ACOSH_TAY02 -8.3333333333333333333333333333333333333333333333333333333333333333333333E-2 /* 1 / 12 */ -#define ACOSH_TAY03 1.8750000000000000000000000000000000000000000000000000000000000000000000E-2 /* 3 / 160 */ -#define ACOSH_TAY04 -5.5803571428571428571428571428571428571428571428571428571428571428571429E-3 /* 5 / 896 */ -#define ACOSH_TAY05 1.8988715277777777777777777777777777777777777777777777777777777777777778E-3 /* 35 / 18432 */ -#define ACOSH_TAY06 -6.9912997159090909090909090909090909090909090909090909090909090909090909E-4 /* 63 / 90112 */ -#define ACOSH_TAY07 2.7113694411057692307692307692307692307692307692307692307692307692307692E-4 /* 231 / 851968 */ -#define ACOSH_TAY08 -1.0910034179687500000000000000000000000000000000000000000000000000000000E-4 /* 143 / 1310720 */ -#define ACOSH_TAY09 4.5124222250545726102941176470588235294117647058823529411764705882352941E-5 /* 6435 / 142606336 */ -#define ACOSH_TAY10 -1.9065643611707185444078947368421052631578947368421052631578947368421053E-5 /* 12155 / 637534208 */ -#define ACOSH_TAY11 8.1936873140789213634672619047619047619047619047619047619047619047619048E-6 /* 46189 / 5637144576 */ -#define ACOSH_TAY12 -3.5705692742181860882302989130434782608695652173913043478260869565217391E-6 /* 88179 / 24696061952 */ -#define ACOSH_TAY13 1.5740259550511837005615234375000000000000000000000000000000000000000000E-6 /* 676039 / 429496729600 */ -#define ACOSH_TAY14 -7.0068819224144573564882631655092592592592592592592592592592592592592593E-7 /* 1300075 / 1855425871872 */ -#define ACOSH_TAY15 3.1453306166503321507881427633351293103448275862068965517241379310344828E-7 /* 5014575 / 15942918602752 */ -#if 0 -#define ACOSH_TAY16 -1.4221629293564136230176494967552923387096774193548387096774193548387097E-7 /* 9694845 / 68169720922112 */ -#define ACOSH_TAY17 6.4711106776113328206437555226412686434659090909090909090909090909090909E-8 /* 100180065 / 1548112371908608 */ -#define ACOSH_TAY18 -2.9609409781171182528071637664522443498883928571428571428571428571428571E-8 /* 116680311 / 3940649673949184 */ -#define ACOSH_TAY19 1.3615438056281793767600509061201198680980785472972972972972972972972973E-8 /* 2268783825 / 166633186212708352 */ -#endif - - - -static __inline vector float _acoshf4(vector float x) -{ - vec_float4 minus_onef = spu_splats(-1.0f); - vec_float4 twof = spu_splats(2.0f); - vec_float4 xminus1; - /* Where we switch from taylor to formula */ - vec_float4 switch_approx = spu_splats(2.0f); - vec_uint4 use_form; - vec_float4 result, fresult, mresult;; - - - /* - * Formula: - * acosh = ln(x + sqrt(x^2 - 1)) - */ - fresult = _sqrtf4(spu_madd(x, x, minus_onef)); - fresult = spu_add(x, fresult); - fresult = _logf4(fresult); - - /* - * Taylor Series - */ - xminus1 = spu_add(x, minus_onef); - - mresult = spu_madd(xminus1, spu_splats((float)ACOSH_TAY15), spu_splats((float)ACOSH_TAY14)); - mresult = spu_madd(xminus1, mresult, spu_splats((float)ACOSH_TAY13)); - mresult = spu_madd(xminus1, mresult, spu_splats((float)ACOSH_TAY12)); - mresult = spu_madd(xminus1, mresult, spu_splats((float)ACOSH_TAY11)); - mresult = spu_madd(xminus1, mresult, spu_splats((float)ACOSH_TAY10)); - mresult = spu_madd(xminus1, mresult, spu_splats((float)ACOSH_TAY09)); - mresult = spu_madd(xminus1, mresult, spu_splats((float)ACOSH_TAY08)); - mresult = spu_madd(xminus1, mresult, spu_splats((float)ACOSH_TAY07)); - mresult = spu_madd(xminus1, mresult, spu_splats((float)ACOSH_TAY06)); - mresult = spu_madd(xminus1, mresult, spu_splats((float)ACOSH_TAY05)); - mresult = spu_madd(xminus1, mresult, spu_splats((float)ACOSH_TAY04)); - mresult = spu_madd(xminus1, mresult, spu_splats((float)ACOSH_TAY03)); - mresult = spu_madd(xminus1, mresult, spu_splats((float)ACOSH_TAY02)); - mresult = spu_madd(xminus1, mresult, spu_splats((float)ACOSH_TAY01)); - - mresult = spu_mul(mresult, _sqrtf4(spu_mul(xminus1, twof))); - - /* - * Select series or formula - */ - use_form = spu_cmpgt(x, switch_approx); - result = spu_sel(mresult, fresult, use_form); - - return result; -} - -#endif /* _ACOSHF4_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/asin.h b/newlib/libm/machine/spu/headers/asin.h deleted file mode 100644 index 881e532bc..000000000 --- a/newlib/libm/machine/spu/headers/asin.h +++ /dev/null @@ -1,18 +0,0 @@ -#include "headers/asind2.h" -#include "headers/dom_chkd_negone_one.h" - -static __inline double _asin(double x) -{ - double res; - vector double vx; - - vx = spu_splats(x); - res = spu_extract(_asind2(vx), 0); -#ifndef _IEEE_LIBM - /* - * Domain error if not in the interval [-1, +1] - */ - dom_chkd_negone_one(vx); -#endif - return res; -} diff --git a/newlib/libm/machine/spu/headers/asind2.h b/newlib/libm/machine/spu/headers/asind2.h deleted file mode 100644 index ad414a287..000000000 --- a/newlib/libm/machine/spu/headers/asind2.h +++ /dev/null @@ -1,178 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ - -#ifdef __SPU__ - -#ifndef _ASIND2_H_ -#define _ASIND2_H_ 1 - -#include - -#include "simdmath.h" -#include "sqrtd2.h" -#include "divd2.h" - - - -/* - * FUNCTION - * vector double _asind2(vector double x) - * - * DESCRIPTION - * Compute the arc sine of the vector of double precision elements - * specified by x, returning the resulting angles in radians. The input - * elements are to be in the closed interval [-1, 1]. Values outside - * this range result in a invalid operation execption being latched in - * the FPSCR register and a NAN is returned. - * - * The basic algorithm computes the arc sine using a rational polynomial - * of the form x + x^3 * P(x^2) / Q(x^2) for inputs |x| in the interval - * [0, 0.5]. Values outsize this range are transformed as by: - * - * asin(x) = PI/2 - 2*asin(sqrt((1-x)/2)) for x in the range (0.5, 1.0] - * - * asin(x) = -PI/2 + 2*asin(sqrt((1+x)/2)) for x in the range [-1.0, -0.5) - * - * This yields the basic algorithm of: - * - * absx = (x < 0.0) ? -x : x; - * - * if (absx > 0.5) { - * if (x < 0) { - * addend = -SM_PI_2; - * multiplier = -2.0; - * } else { - * addend = SM_PI_2; - * multiplier = 2.0; - * } - * - * x = sqrt(-0.5 * absx + 0.5); - * } else { - * addend = 0.0; - * multiplier = 1.0; - * } - * - * x2 = x * x; - * x3 = x2 * x; - * - * p = ((((P5 * x2 + P4)*x2 + P3)*x2 + P2)*x2 + P1)*x2 + P0; - * - * q = ((((Q5 * x2 + Q4)*x2 + Q3)*x2 + Q2)*x2 + Q1)*x2 + Q0;; - * - * pq = p / q; - * - * result = addend - (x3*pq + x)*multiplier; - * - * Where P5-P0 and Q5-Q0 are the polynomial coeficients. - */ -static __inline vector double _asind2(vector double x) -{ - vec_uint4 x_gt_half, x_eq_half; - vec_double2 x_abs; // absolute value of x - vec_double2 x_trans; // transformed x when |x| > 0.5 - vec_double2 x2, x3; // x squared and x cubed, respectively. - vec_double2 result; - vec_double2 multiplier, addend; - vec_double2 p, q, pq; - vec_double2 half = spu_splats(0.5); - vec_double2 sign = (vec_double2)spu_splats(0x8000000000000000ULL); - vec_uchar16 splat_hi = ((vec_uchar16){0,1,2,3, 0,1,2,3, 8,9,10,11, 8,9,10,11}); - - // Compute the absolute value of x - x_abs = spu_andc(x, sign); - - // Perform transformation for the case where |x| > 0.5. We rely on - // sqrtd2 producing a NAN is |x| > 1.0. - x_trans = _sqrtd2(spu_nmsub(x_abs, half, half)); - - // Determine the correct addend and multiplier. - x_gt_half = spu_cmpgt((vec_uint4)x_abs, (vec_uint4)half); - x_eq_half = spu_cmpeq((vec_uint4)x_abs, (vec_uint4)half); - x_gt_half = spu_or(x_gt_half, spu_and(x_eq_half, spu_rlqwbyte(x_gt_half, 4))); - x_gt_half = spu_shuffle(x_gt_half, x_gt_half, splat_hi); - - addend = spu_and(spu_sel(spu_splats((double)SM_PI_2), x, (vec_ullong2)sign), (vec_double2)x_gt_half); - - multiplier = spu_sel(spu_splats(-1.0), spu_sel(spu_splats(2.0), x, (vec_ullong2)sign), (vec_ullong2)x_gt_half); - - // Select whether to use the x or the transformed x for the polygon evaluation. - // if |x| > 0.5 use x_trans - // else use x - - x = spu_sel(x, x_trans, (vec_ullong2)x_gt_half); - - // Compute the polynomials. - - x2 = spu_mul(x, x); - x3 = spu_mul(x2, x); - - p = spu_madd(spu_splats(0.004253011369004428248960), x2, spu_splats(-0.6019598008014123785661)); - p = spu_madd(p, x2, spu_splats(5.444622390564711410273)); - p = spu_madd(p, x2, spu_splats(-16.26247967210700244449)); - p = spu_madd(p, x2, spu_splats(19.56261983317594739197)); - p = spu_madd(p, x2, spu_splats(-8.198089802484824371615)); - - q = spu_add(x2, spu_splats(-14.74091372988853791896)); - q = spu_madd(q, x2, spu_splats(70.49610280856842141659)); - q = spu_madd(q, x2, spu_splats(-147.1791292232726029859)); - q = spu_madd(q, x2, spu_splats(139.5105614657485689735)); - q = spu_madd(q, x2, spu_splats(-49.18853881490881290097)); - - // Compute the rational solution p/q and final multiplication and addend - // correction. - pq = _divd2(p, q); - - result = spu_nmsub(spu_madd(x3, pq, x), multiplier, addend); - - return (result); -} - -#endif /* _ASIND2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/asinf.h b/newlib/libm/machine/spu/headers/asinf.h deleted file mode 100644 index cb468ecec..000000000 --- a/newlib/libm/machine/spu/headers/asinf.h +++ /dev/null @@ -1,18 +0,0 @@ -#include "headers/asinf4.h" -#include "headers/dom_chkf_negone_one.h" - -static __inline float _asinf(float x) -{ - float res; - vector float vx; - - vx = spu_splats(x); - res = spu_extract(_asinf4(vx), 0); -#ifndef _IEEE_LIBM - /* - * Domain error if not in the interval [-1, +1] - */ - dom_chkf_negone_one(vx); -#endif - return res; -} diff --git a/newlib/libm/machine/spu/headers/asinf4.h b/newlib/libm/machine/spu/headers/asinf4.h deleted file mode 100644 index fefee5703..000000000 --- a/newlib/libm/machine/spu/headers/asinf4.h +++ /dev/null @@ -1,156 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ - -#ifndef _ASINF4_H_ -#define _ASINF4_H_ 1 - -#include - -#include "divf4.h" -#include "sqrtf4.h" - -/* - * FUNCTION - * vector float _asinf4(vector float x) - * - * DESCRIPTION - * The _asinf4 function computes the arc sine for a vector of values x; - * that is the values whose sine is x. Results are undefined if x is - * outside the range [-1, 1]. - * - */ -static __inline vector float _asinf4(vector float x) -{ - /* The arcsin is computed using two different algorithms, depending - * upon the absolute value of the input. For inputs in the range - * [0, PI/4], it is computed as the ratio of two polynomials. - * - * asin(x) = p/q; - * - * where p = P11*x^11 + P09*x^9 + P07*x^7 + P05*x^5 + P03*x3 + x - * q = Q08*x^8 + Q06*x^6 + Q04*x^4 + Q02*x^2 + Q00 - * - * For the range of value [PI/4, 1], the arcsin is computed using: - * - * asin = PI/2 - sqrt(1 - x) * r; - * - * where r = C07*x^7 + C06*x^6 + C05*x^5 + C04*x^4 + C03*x^3 + C02*x^2 - * C01*x + C00; - */ - vector float r, r1, r2, r_hi, r_lo; - vector float xabs, x2, x4, x6; - vector float p, p_hi, p_lo; - vector float q, q_hi, q_lo; - vector float pi_over_2 = spu_splats(1.5707963267949f); - vector float pi_over_4 = spu_splats(0.7853981633974f); - vector unsigned int msb = spu_splats(0x80000000); - - - x2 = spu_mul(x, x); - x4 = spu_mul(x2, x2); - x6 = spu_mul(x4, x2); - - xabs = spu_andc(x, (vector float)msb); - - /* Compute arc-sin for values in the range [0, PI/4] - */ - p_hi = spu_madd(spu_splats(0.0000347933107596021167570f), x2, - spu_splats(0.000791534994289814532176f)); - p_hi = spu_madd(p_hi, x2, spu_splats(-0.0400555345006794114027f)); - - p_lo = spu_madd(spu_splats(0.201212532134862925881f), x2, - spu_splats(-0.325565818622400915405f)); - p_lo = spu_madd(p_lo, x2, spu_splats(0.166666666666666657415f)); - - p = spu_madd(p_hi, x6, p_lo); - - q_hi = spu_madd(spu_splats(0.0770381505559019352791f), x2, - spu_splats(-0.688283971605453293030f)); - q_hi = spu_madd(q_hi, x2, spu_splats(2.02094576023350569471f)); - - q_lo = spu_madd(spu_splats(-2.40339491173441421878f), x2, - spu_splats(1.0f)); - - q = spu_madd(q_hi, x4, q_lo); - - r1 = spu_madd(_divf4(p, q), spu_mul(xabs, x2), xabs); - - /* Compute arc-sin for values in the range [PI/4, 1] - */ - r_hi = spu_madd(spu_splats(-0.0012624911f), xabs, - spu_splats(0.0066700901f)); - r_hi = spu_madd(r_hi, xabs, spu_splats(-0.0170881256f)); - r_hi = spu_madd(r_hi, xabs, spu_splats(0.0308918810f)); - - r_lo = spu_madd(spu_splats(-0.0501743046f), xabs, - spu_splats(0.0889789874f)); - r_lo = spu_madd(r_lo, xabs, spu_splats(-0.2145988016f)); - r_lo = spu_madd(r_lo, xabs, pi_over_2); - - r = spu_madd(r_hi, x4, r_lo); - - r2 = spu_nmsub(r, _sqrtf4(spu_sub(spu_splats(1.0f), xabs)), - pi_over_2); - - /* Select the result depending upon the input value. Correct the - * sign of the result. - */ - return (spu_sel(spu_sel(r1, r2, spu_cmpgt(xabs, pi_over_4)), - x, msb)); -} - -#endif /* _ASINF4_H_ */ -#endif /* __SPU__ */ - - diff --git a/newlib/libm/machine/spu/headers/asinh.h b/newlib/libm/machine/spu/headers/asinh.h deleted file mode 100644 index b80a79a6a..000000000 --- a/newlib/libm/machine/spu/headers/asinh.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/asinhd2.h" - -static __inline double _asinh(double x) -{ - return spu_extract(_asinhd2(spu_promote(x, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/asinhd2.h b/newlib/libm/machine/spu/headers/asinhd2.h deleted file mode 100644 index 542d59858..000000000 --- a/newlib/libm/machine/spu/headers/asinhd2.h +++ /dev/null @@ -1,189 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _ASINHD2_H_ -#define _ASINHD2_H_ 1 - -#include - -#include "logd2.h" -#include "sqrtd2.h" - -/* - * FUNCTION - * vector double _asinhd2(vector double x) - * - * DESCRIPTION - * The asinhd2 function returns a vector containing the hyperbolic - * arcsines of the corresponding elements of the input vector. - * - * We are using the formula: - * asinh = ln(|x| + sqrt(x^2 + 1)) - * and the anti-symmetry of asinh. - * - * For x near zero, we use the Taylor series: - * - * infinity - * ------ - * - ' P (0) - * - k-1 k - * asinh x = - ----- x - * - k - * - , - * ------ - * k = 1 - * - * Special Cases: - * asinh(+0) returns +0 - * asinh(-0) returns -0 - * asinh(+infinity) returns +infinity - * asinh(-infinity) returns -infinity - * asinh(NaN) returns NaN - * - */ - -/* - * Maclaurin Series Coefficients - * for x near 0. - */ -#define ASINH_MAC01 1.0000000000000000000000000000000000000000000000000000000000000000000000E0 -#define ASINH_MAC03 -1.6666666666666666666666666666666666666666666666666666666666666666666667E-1 -#define ASINH_MAC05 7.5000000000000000000000000000000000000000000000000000000000000000000000E-2 -#define ASINH_MAC07 -4.4642857142857142857142857142857142857142857142857142857142857142857143E-2 -#define ASINH_MAC09 3.0381944444444444444444444444444444444444444444444444444444444444444444E-2 -#define ASINH_MAC11 -2.2372159090909090909090909090909090909090909090909090909090909090909091E-2 -#define ASINH_MAC13 1.7352764423076923076923076923076923076923076923076923076923076923076923E-2 -#define ASINH_MAC15 -1.3964843750000000000000000000000000000000000000000000000000000000000000E-2 -#define ASINH_MAC17 1.1551800896139705882352941176470588235294117647058823529411764705882353E-2 -#if 0 -#define ASINH_MAC19 -9.7616095291940789473684210526315789473684210526315789473684210526315789E-3 -#define ASINH_MAC21 8.3903358096168154761904761904761904761904761904761904761904761904761905E-3 -#define ASINH_MAC23 -7.3125258735988451086956521739130434782608695652173913043478260869565217E-3 -#define ASINH_MAC25 6.4472103118896484375000000000000000000000000000000000000000000000000000E-3 -#define ASINH_MAC27 -5.7400376708419234664351851851851851851851851851851851851851851851851852E-3 -#define ASINH_MAC29 5.1533096823199041958512931034482758620689655172413793103448275862068966E-3 -#define ASINH_MAC31 -4.6601434869150961599042338709677419354838709677419354838709677419354839E-3 -#define ASINH_MAC33 4.2409070936793630773370916193181818181818181818181818181818181818181818E-3 -#define ASINH_MAC35 -3.8809645588376692363194056919642857142857142857142857142857142857142857E-3 -#define ASINH_MAC37 3.5692053938259345454138678473395270270270270270270270270270270270270270E-3 -#define ASINH_MAC39 -3.2970595034734847453924325796274038461538461538461538461538461538461538E-3 -#define ASINH_MAC41 3.0578216492580306693548109473251714939024390243902439024390243902439024E-3 -#define ASINH_MAC43 -2.8461784011089421678767647854117460029069767441860465116279069767441860E-3 -#endif - - -static __inline vector double _asinhd2(vector double x) -{ - vec_double2 sign_mask = spu_splats(-0.0); - vec_double2 oned = spu_splats(1.0); - vec_uchar16 dup_even = ((vec_uchar16) { 0,1,2,3, 0,1,2,3, 8,9,10,11, 8,9,10,11 }); - vec_uint4 infminus1 = spu_splats(0x7FEFFFFFU); - vec_uint4 isinfnan; - vec_double2 xabs, xsqu; - vec_uint4 xabshigh; - /* Where we switch from maclaurin to formula */ - vec_float4 switch_approx = spu_splats(0.165f); - vec_uint4 use_form; - vec_float4 xf; - vec_double2 result, fresult, mresult; - - - xabs = spu_andc(x, sign_mask); - xsqu = spu_mul(x, x); - - xf = spu_roundtf(xabs); - xf = spu_shuffle(xf, xf, dup_even); - - /* - * Formula: - * asinh = ln(|x| + sqrt(x^2 + 1)) - */ - fresult = _sqrtd2(spu_add(xsqu, oned)); - fresult = spu_add(xabs, fresult); - fresult = _logd2(fresult); - - - /* - * Maclaurin Series approximation - */ - mresult = spu_madd(xsqu, spu_splats(ASINH_MAC17), spu_splats(ASINH_MAC15)); - mresult = spu_madd(xsqu, mresult, spu_splats(ASINH_MAC13)); - mresult = spu_madd(xsqu, mresult, spu_splats(ASINH_MAC11)); - mresult = spu_madd(xsqu, mresult, spu_splats(ASINH_MAC09)); - mresult = spu_madd(xsqu, mresult, spu_splats(ASINH_MAC07)); - mresult = spu_madd(xsqu, mresult, spu_splats(ASINH_MAC05)); - mresult = spu_madd(xsqu, mresult, spu_splats(ASINH_MAC03)); - mresult = spu_madd(xsqu, mresult, spu_splats(ASINH_MAC01)); - mresult = spu_mul(xabs, mresult); - - - /* - * Choose between series and formula - */ - use_form = spu_cmpgt(xf, switch_approx); - result = spu_sel(mresult, fresult, (vec_ullong2)use_form); - - - /* Special Cases */ - - /* Infinity and NaN */ - xabshigh = (vec_uint4)spu_shuffle(xabs, xabs, dup_even); - isinfnan = spu_cmpgt(xabshigh, infminus1); - result = spu_sel(result, x, (vec_ullong2)isinfnan); - - - /* Restore sign - asinh is an anti-symmetric */ - result = spu_sel(result, x, (vec_ullong2)sign_mask); - - return result; -} - -#endif /* _ASINHD2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/asinhf.h b/newlib/libm/machine/spu/headers/asinhf.h deleted file mode 100644 index 6abd16e2e..000000000 --- a/newlib/libm/machine/spu/headers/asinhf.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/asinhf4.h" - -static __inline float _asinhf(float x) -{ - return spu_extract(_asinhf4(spu_promote(x, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/asinhf4.h b/newlib/libm/machine/spu/headers/asinhf4.h deleted file mode 100644 index c6e317a7c..000000000 --- a/newlib/libm/machine/spu/headers/asinhf4.h +++ /dev/null @@ -1,180 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _ASINHF4_H_ -#define _ASINHF4_H_ 1 - -#include - -#include "logf4.h" -#include "sqrtf4.h" - -/* - * FUNCTION - * vector float _asinhf4(vector float x) - * - * DESCRIPTION - * The asinhf4 function returns a vector containing the hyperbolic - * arcsines of the corresponding elements of the input vector. - * - * We are using the formula: - * asinh = ln(|x| + sqrt(x^2 + 1)) - * and the anti-symmetry of asinh. - * - * For x near zero, we use the Taylor series: - * - * infinity - * ------ - * - ' P (0) - * - k-1 k - * asinh x = - ----- x - * - k - * - , - * ------ - * k = 1 - * - * Special Cases: - * - asinh(+0) returns +0 - * - asinh(-0) returns -0 - * - Normally, asinh(+/- infinity) returns +/- infinity, - * but on the SPU, single-precision infinity is not supported, - * so it is treated as a normal number here. - * - */ - -/* - * Maclaurin Series Coefficients - * for x near 0. - */ -#define ASINH_MAC01 1.0000000000000000000000000000000000000000000000000000000000000000000000E0 -#define ASINH_MAC03 -1.6666666666666666666666666666666666666666666666666666666666666666666667E-1 -#define ASINH_MAC05 7.5000000000000000000000000000000000000000000000000000000000000000000000E-2 -#define ASINH_MAC07 -4.4642857142857142857142857142857142857142857142857142857142857142857143E-2 -#define ASINH_MAC09 3.0381944444444444444444444444444444444444444444444444444444444444444444E-2 -#define ASINH_MAC11 -2.2372159090909090909090909090909090909090909090909090909090909090909091E-2 -#define ASINH_MAC13 1.7352764423076923076923076923076923076923076923076923076923076923076923E-2 -#define ASINH_MAC15 -1.3964843750000000000000000000000000000000000000000000000000000000000000E-2 -#define ASINH_MAC17 1.1551800896139705882352941176470588235294117647058823529411764705882353E-2 -#define ASINH_MAC19 -9.7616095291940789473684210526315789473684210526315789473684210526315789E-3 -#define ASINH_MAC21 8.3903358096168154761904761904761904761904761904761904761904761904761905E-3 -#define ASINH_MAC23 -7.3125258735988451086956521739130434782608695652173913043478260869565217E-3 -#define ASINH_MAC25 6.4472103118896484375000000000000000000000000000000000000000000000000000E-3 -#define ASINH_MAC27 -5.7400376708419234664351851851851851851851851851851851851851851851851852E-3 -#define ASINH_MAC29 5.1533096823199041958512931034482758620689655172413793103448275862068966E-3 -#if 0 -#define ASINH_MAC31 -4.6601434869150961599042338709677419354838709677419354838709677419354839E-3 -#define ASINH_MAC33 4.2409070936793630773370916193181818181818181818181818181818181818181818E-3 -#define ASINH_MAC35 -3.8809645588376692363194056919642857142857142857142857142857142857142857E-3 -#define ASINH_MAC37 3.5692053938259345454138678473395270270270270270270270270270270270270270E-3 -#define ASINH_MAC39 -3.2970595034734847453924325796274038461538461538461538461538461538461538E-3 -#define ASINH_MAC41 3.0578216492580306693548109473251714939024390243902439024390243902439024E-3 -#define ASINH_MAC43 -2.8461784011089421678767647854117460029069767441860465116279069767441860E-3 -#endif - - - -static __inline vector float _asinhf4(vector float x) -{ - vec_float4 sign_mask = spu_splats(-0.0f); - vec_float4 onef = spu_splats(1.0f); - vec_float4 result, fresult, mresult;; - vec_float4 xabs, xsqu; - /* Where we switch from maclaurin to formula */ - vec_float4 switch_approx = spu_splats(0.685f); - vec_uint4 use_form; - - - xabs = spu_andc(x, sign_mask); - xsqu = spu_mul(x, x); - - /* - * Formula: - * asinh = ln(|x| + sqrt(x^2 + 1)) - */ - fresult = _sqrtf4(spu_madd(x, x, onef)); - fresult = spu_add(xabs, fresult); - fresult = _logf4(fresult); - - - /* - * Maclaurin Series - */ - mresult = spu_madd(xsqu, spu_splats((float)ASINH_MAC29), spu_splats((float)ASINH_MAC27)); - mresult = spu_madd(xsqu, mresult, spu_splats((float)ASINH_MAC25)); - mresult = spu_madd(xsqu, mresult, spu_splats((float)ASINH_MAC23)); - mresult = spu_madd(xsqu, mresult, spu_splats((float)ASINH_MAC21)); - mresult = spu_madd(xsqu, mresult, spu_splats((float)ASINH_MAC19)); - mresult = spu_madd(xsqu, mresult, spu_splats((float)ASINH_MAC17)); - mresult = spu_madd(xsqu, mresult, spu_splats((float)ASINH_MAC15)); - mresult = spu_madd(xsqu, mresult, spu_splats((float)ASINH_MAC13)); - mresult = spu_madd(xsqu, mresult, spu_splats((float)ASINH_MAC11)); - mresult = spu_madd(xsqu, mresult, spu_splats((float)ASINH_MAC09)); - mresult = spu_madd(xsqu, mresult, spu_splats((float)ASINH_MAC07)); - mresult = spu_madd(xsqu, mresult, spu_splats((float)ASINH_MAC05)); - mresult = spu_madd(xsqu, mresult, spu_splats((float)ASINH_MAC03)); - mresult = spu_madd(xsqu, mresult, spu_splats((float)ASINH_MAC01)); - mresult = spu_mul(xabs, mresult); - - - /* - * Choose between series and formula - */ - use_form = spu_cmpgt(xabs, switch_approx); - result = spu_sel(mresult, fresult, use_form); - - - /* Preserve sign - asinh is anti-symmetric */ - result = spu_sel(result, x, (vec_uint4)sign_mask); - - return result; -} - -#endif /* _ASINHF4_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/atan.h b/newlib/libm/machine/spu/headers/atan.h deleted file mode 100644 index 18ff615d8..000000000 --- a/newlib/libm/machine/spu/headers/atan.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/atand2.h" - -static __inline double _atan(double x) -{ - return spu_extract(_atand2(spu_promote(x, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/atan2.h b/newlib/libm/machine/spu/headers/atan2.h deleted file mode 100644 index a95c71665..000000000 --- a/newlib/libm/machine/spu/headers/atan2.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/atan2d2.h" - -static __inline double _atan2(double y, double x) -{ - return spu_extract(_atan2d2(spu_promote(y, 0), spu_promote(x, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/atan2d2.h b/newlib/libm/machine/spu/headers/atan2d2.h deleted file mode 100644 index 2c8e576af..000000000 --- a/newlib/libm/machine/spu/headers/atan2d2.h +++ /dev/null @@ -1,108 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _ATAN2D2_H_ -#define _ATAN2D2_H_ 1 - -#include - -#include "divd2.h" -#include "atand2.h" - -/* - * FUNCTION - * vector double _atan2d2(vector double y, vector double x) - * - * DESCRIPTION - * The atan2d2 function returns a vector containing the angles - * whose tangets are y/x for the corresponding elements of the - * input vectors. - * - * The reason this function exists is to use the signs of the - * arguments to determine the quadrant of the result. Consider - * sin(x)/cos(x) on the domain (-pi, pi]. Four quadrants are - * defined by the signs of sin and cos on this domain. - * - * Special Cases: - * - If the corresponding elements of x and y are zero, the - * resulting element is undefined. - * - */ - -static __inline vector double _atan2d2(vector double y, vector double x) -{ - vec_uchar16 dup_even = ((vec_uchar16) { 0,1,2,3, 0,1,2,3, 8,9,10,11, 8,9,10,11 }); - vector double pi = spu_splats(SM_PI); - vector unsigned long long ones = spu_splats(0xFFFFFFFFFFFFFFFFull); - vector unsigned long long quad1; - vector unsigned long long quad4; - vector double result; - - vector unsigned long long xlt0; - vector unsigned long long yge0; - vector unsigned long long ylt0; - - xlt0 = (vec_ullong2)spu_rlmaska((vec_int4)spu_shuffle(x,x,dup_even), 31); - ylt0 = (vec_ullong2)spu_rlmaska((vec_int4)spu_shuffle(y,y,dup_even), 31); - yge0 = spu_xor(ylt0, ones); - - quad1 = spu_and(ylt0, xlt0); - quad4 = spu_and(yge0, xlt0); - - result = _atand2(_divd2(y,x)); - - result = spu_sel(result, spu_sub(result, pi), quad1); - result = spu_sel(result, spu_add(result, pi), quad4); - - return result; -} - -#endif /* _ATAN2D2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/atan2f.h b/newlib/libm/machine/spu/headers/atan2f.h deleted file mode 100644 index 8e4ca67bd..000000000 --- a/newlib/libm/machine/spu/headers/atan2f.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/atan2f4.h" - -static __inline float _atan2f(float y, float x) -{ - return spu_extract(_atan2f4(spu_promote(y, 0), spu_promote(x, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/atan2f4.h b/newlib/libm/machine/spu/headers/atan2f4.h deleted file mode 100644 index 58293fbeb..000000000 --- a/newlib/libm/machine/spu/headers/atan2f4.h +++ /dev/null @@ -1,106 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _ATAN2F4_H_ -#define _ATAN2F4_H_ 1 - -#include - -#include "divf4.h" -#include "atanf4.h" - -/* - * FUNCTION - * vector float _atan2f4(vector float y, vector float x) - * - * DESCRIPTION - * The atan2f4 function returns a vector containing the angles - * whose tangets are y/x for the corresponding elements of the - * input vectors. - * - * The reason this function exists is to use the signs of the - * arguments to determine the quadrant of the result. Consider - * sin(x)/cos(x) on the domain (-pi, pi]. Four quadrants are - * defined by the signs of sin and cos on this domain. - * - * Special Cases: - * - If the corresponding elements of x and y are zero, the - * resulting element is undefined. - * - */ - -static __inline vector float _atan2f4(vector float y, vector float x) -{ - vector float pi = spu_splats((float)SM_PI); - vector float zero = spu_splats(0.0f); - vector unsigned int quad1; - vector unsigned int quad4; - vector float result; - - vector unsigned int xlt0; - vector unsigned int yge0; - vector unsigned int ylt0; - - xlt0 = (vec_uint4)spu_rlmaska((vec_int4)x, 31); - ylt0 = (vec_uint4)spu_rlmaska((vec_int4)y, 31); - yge0 = spu_cmpeq(ylt0, (vec_uint4)zero); - - quad1 = spu_and(ylt0, xlt0); - quad4 = spu_and(yge0, xlt0); - - result = _atanf4(_divf4(y,x)); - result = spu_sel(result, spu_sub(result, pi), quad1); - result = spu_sel(result, spu_add(result, pi), quad4); - - return result; -} - -#endif /* _ATAN2F4_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/atand2.h b/newlib/libm/machine/spu/headers/atand2.h deleted file mode 100644 index 27d55c9b3..000000000 --- a/newlib/libm/machine/spu/headers/atand2.h +++ /dev/null @@ -1,115 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ - -#ifdef __SPU__ - -#ifndef _ATAND2_H_ -#define _ATAND2_H_ 1 - -#include - -#include "simdmath.h" -#include "recipd2.h" -#include "logd2.h" -#include "acosd2.h" -#include "asind2.h" -#include "sqrtd2.h" - -/* - * FUNCTION - * vector double _atand2(vector double x) - * - * DESCRIPTION - * The _atand2 function computes the arc tangent of a vector of values x. - * - * The arc tangent function is computed using the following relations: - * [0, 1] : arcsin(x1/sqrt(spu_add(x1squ + 1 ))); - * (1, infinity] : PI/2 + atanf(-1/x) - * [-infinity, 0) : -arcsin(|x|) - * - */ - -static __inline vector double _atand2(vector double x) -{ - vector double signbit = spu_splats(-0.0); - vector double oned = spu_splats(1.0); - vector double pi2 = spu_splats(SM_PI_2); - vector double xabs, x1; - vector double result; - vector unsigned long long gt1; - - xabs = spu_andc(x, signbit); - gt1 = spu_cmpgt(xabs, oned); - - /* - * For x > 1, use the relation: - * atan(x) = pi/2 - atan(1/x), x>1 - */ - x1 = spu_sel(xabs, _recipd2(xabs), gt1); - - vector double x1squ = spu_mul(x1, x1); - - result = _asind2(_divd2(x1, _sqrtd2(spu_add(x1squ, oned)))); - - /* - * For x > 1, use the relation: atan(x) = pi/2 - atan(1/x), x>1 - */ - result = spu_sel(result, spu_sub(pi2, result), gt1); - - /* - * Antisymmetric function - preserve sign of x in result. - */ - result = spu_sel(result, x, (vec_ullong2)signbit); - - return (result); -} - -#endif /* _ATAND2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/atanf.h b/newlib/libm/machine/spu/headers/atanf.h deleted file mode 100644 index ec01c1ec8..000000000 --- a/newlib/libm/machine/spu/headers/atanf.h +++ /dev/null @@ -1,112 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _ATANF_H_ -#define _ATANF_H_ 1 - -#ifndef M_PI_2 -#define M_PI_2 1.5707963267949f -#endif /* M_PI_2 */ - -/* - * FUNCTION - * float _atanf(float x) - * - * DESCRIPTION - * _atanf computes the arc tangent of the value x; that is the value - * whose tangent is x. - * - * _atanf returns the arc tangent in radians and the value is - * mathematically defined to be in the range -PI/2 to PI/2. - * - * The arc tangent function is computed using a polynomial approximation - * (B. Carlson, M. Goldstein, Los Alamos Scientific Laboratiry, 1955). - * __8__ - * \ - * \ - * atanf(x) = / Ci*x^(2*i+1) - * /____ - * i=0 - * - * for x in the range -1 to 1. The remaining regions are defined to be: - * - * [1, infinity] : PI/2 + atanf(-1/x) - * [-infinity, -1] : -PI/2 + atanf(-1/x) - */ - -static __inline float _atanf(float x) -{ - float xabs; - float bias; - float x2, x3, x4, x8, x9; - float hi, lo; - float result; - - bias = 0.0f; - xabs = (x < 0.0f) ? -x : x; - - if (xabs >= 1.0f) { - bias = M_PI_2; - if (x < 0.0f) { - bias = -bias; - } - x = -1.0f / x; - } - /* Instruction counts can be reduced if the polynomial was - * computed entirely from nested (dependent) fma's. However, - * to reduce the number of pipeline stalls, the polygon is evaluated - * in two halves(hi and lo). - */ - bias += x; - - x2 = x * x; - x3 = x2 * x; - x4 = x2 * x2; - x8 = x4 * x4; - x9 = x8 * x; - hi = 0.0028662257f * x2 - 0.0161657367f; - hi = hi * x2 + 0.0429096138f; - hi = hi * x2 - 0.0752896400f; - hi = hi * x2 + 0.1065626393f; - lo = -0.1420889944f * x2 + 0.1999355085f; - lo = lo * x2 - 0.3333314528f; - lo = lo * x3 + bias; - - result = hi * x9 + lo; - - return (result); -} - -#endif /* _ATANF_H_ */ - - - diff --git a/newlib/libm/machine/spu/headers/atanf4.h b/newlib/libm/machine/spu/headers/atanf4.h deleted file mode 100644 index a62b88c28..000000000 --- a/newlib/libm/machine/spu/headers/atanf4.h +++ /dev/null @@ -1,136 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ - -#ifndef _ATANF4_H_ -#define _ATANF4_H_ 1 - -#include - -#include "simdmath.h" -#include "recipf4.h" - -/* - * FUNCTION - * vector float _atanf4(vector float x) - * - * DESCRIPTION - * The _atanf4 function computes the arc tangent of a vector of values x; - * that is the values whose tangent is x. - * - * The _atanf4 function returns the arc tangents in radians and the value - * is mathematically defined to be in the range -PI/2 to PI/2. - * - * The arc tangent function is computed using a polynomial approximation - * (B. Carlson, M. Goldstein, Los Alamos Scientific Laboratory, 1955). - * __8__ - * \ - * \ - * atan(x) = / Ci*x^(2*i+1) - * /____ - * i=0 - * - * for x in the range -1 to 1. The remaining regions are defined to be: - * - * [1, infinity] : PI/2 + atanf(-1/x) - * [-infinity, -1] : -PI/2 + atanf(-1/x) - * - */ -static __inline vector float _atanf4(vector float x) -{ - vector float bias; - vector float x2, x3, x4, x8, x9; - vector float hi, lo; - vector float result; - vector float inv_x; - vector unsigned int sign; - vector unsigned int select; - - sign = spu_sl(spu_rlmask((vector unsigned int)x, -31), 31); - inv_x = _recipf4(x); - inv_x = (vector float)spu_xor((vector unsigned int)inv_x, spu_splats(0x80000000)); - - select = (vector unsigned int)spu_cmpabsgt(x, spu_splats(1.0f)); - bias = (vector float)spu_or(sign, (vector unsigned int)(spu_splats((float)SM_PI_2))); - bias = (vector float)spu_and((vector unsigned int)bias, select); - - x = spu_sel(x, inv_x, select); - - /* Instruction counts can be reduced if the polynomial was - * computed entirely from nested (dependent) fma's. However, - * to reduce the number of pipeline stalls, the polygon is evaluated - * in two halves(hi and lo). - */ - bias = spu_add(bias, x); - x2 = spu_mul(x, x); - x3 = spu_mul(x2, x); - x4 = spu_mul(x2, x2); - x8 = spu_mul(x4, x4); - x9 = spu_mul(x8, x); - hi = spu_madd(spu_splats(0.0028662257f), x2, spu_splats(-0.0161657367f)); - hi = spu_madd(hi, x2, spu_splats(0.0429096138f)); - hi = spu_madd(hi, x2, spu_splats(-0.0752896400f)); - hi = spu_madd(hi, x2, spu_splats(0.1065626393f)); - lo = spu_madd(spu_splats(-0.1420889944f), x2, spu_splats(0.1999355085f)); - lo = spu_madd(lo, x2, spu_splats(-0.3333314528f)); - lo = spu_madd(lo, x3, bias); - - result = spu_madd(hi, x9, lo); - - return (result); -} - -#endif /* _ATANF4_H_ */ -#endif /* __SPU__ */ - - diff --git a/newlib/libm/machine/spu/headers/atanh.h b/newlib/libm/machine/spu/headers/atanh.h deleted file mode 100644 index f81ad2ede..000000000 --- a/newlib/libm/machine/spu/headers/atanh.h +++ /dev/null @@ -1,18 +0,0 @@ -#include "headers/atanhd2.h" -#include "headers/dom_chkd_negone_one.h" - -static __inline double _atanh(double x) -{ - double res; - vector double vx; - - vx = spu_splats(x); - res = spu_extract(_atanhd2(vx), 0); -#ifndef _IEEE_LIBM - /* - * Domain error if not in the interval [-1, +1] - */ - dom_chkd_negone_one(vx); -#endif - return res; -} diff --git a/newlib/libm/machine/spu/headers/atanhd2.h b/newlib/libm/machine/spu/headers/atanhd2.h deleted file mode 100644 index b1bc33ef9..000000000 --- a/newlib/libm/machine/spu/headers/atanhd2.h +++ /dev/null @@ -1,177 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _ATANHD2_H_ -#define _ATANHD2_H_ 1 - -#include -#include "logd2.h" - -/* - * FUNCTION - * vector double _atanhd2(vector double x) - * - * DESCRIPTION - * The atanhd2 function returns a vector containing the hyperbolic - * arctangents of the corresponding elements of the input vector. - * - * We are using the formula: - * atanh x = 1/2 * ln((1 + x)/(1 - x)) = 1/2 * [ln(1+x) - ln(1-x)] - * and the anti-symmetry of atanh. - * - * For x near 0, we use the Taylor series: - * atanh x = x + x^3/3 + x^5/5 + x^7/7 + x^9/9 + ... - * - * Special Cases: - * - atanh(1) = Infinity - * - atanh(-1) = -Infinity - * - atanh(x) for |x| > 1 = NaN - * - */ - -/* - * Maclaurin Series Coefficients - * for x near 0. - */ -#define ATANH_MAC01 1.0000000000000000000000000000000000000000000000000000000000000000000000E0 -#define ATANH_MAC03 3.3333333333333333333333333333333333333333333333333333333333333333333333E-1 -#define ATANH_MAC05 2.0000000000000000000000000000000000000000000000000000000000000000000000E-1 -#define ATANH_MAC07 1.4285714285714285714285714285714285714285714285714285714285714285714286E-1 -#define ATANH_MAC09 1.1111111111111111111111111111111111111111111111111111111111111111111111E-1 -#define ATANH_MAC11 9.0909090909090909090909090909090909090909090909090909090909090909090909E-2 -#define ATANH_MAC13 7.6923076923076923076923076923076923076923076923076923076923076923076923E-2 -#if 0 -#define ATANH_MAC15 6.6666666666666666666666666666666666666666666666666666666666666666666667E-2 -#define ATANH_MAC17 5.8823529411764705882352941176470588235294117647058823529411764705882353E-2 -#define ATANH_MAC19 5.2631578947368421052631578947368421052631578947368421052631578947368421E-2 -#define ATANH_MAC21 4.7619047619047619047619047619047619047619047619047619047619047619047619E-2 -#define ATANH_MAC23 4.3478260869565217391304347826086956521739130434782608695652173913043478E-2 -#define ATANH_MAC25 4.0000000000000000000000000000000000000000000000000000000000000000000000E-2 -#define ATANH_MAC27 3.7037037037037037037037037037037037037037037037037037037037037037037037E-2 -#define ATANH_MAC29 3.4482758620689655172413793103448275862068965517241379310344827586206897E-2 -#define ATANH_MAC31 3.2258064516129032258064516129032258064516129032258064516129032258064516E-2 -#define ATANH_MAC33 3.0303030303030303030303030303030303030303030303030303030303030303030303E-2 -#define ATANH_MAC35 2.8571428571428571428571428571428571428571428571428571428571428571428571E-2 -#define ATANH_MAC37 2.7027027027027027027027027027027027027027027027027027027027027027027027E-2 -#define ATANH_MAC39 2.5641025641025641025641025641025641025641025641025641025641025641025641E-2 -#define ATANH_MAC41 2.4390243902439024390243902439024390243902439024390243902439024390243902E-2 -#define ATANH_MAC43 2.3255813953488372093023255813953488372093023255813953488372093023255814E-2 -#define ATANH_MAC45 2.2222222222222222222222222222222222222222222222222222222222222222222222E-2 -#define ATANH_MAC47 2.1276595744680851063829787234042553191489361702127659574468085106382979E-2 -#define ATANH_MAC49 2.0408163265306122448979591836734693877551020408163265306122448979591837E-2 -#define ATANH_MAC51 1.9607843137254901960784313725490196078431372549019607843137254901960784E-2 -#define ATANH_MAC53 1.8867924528301886792452830188679245283018867924528301886792452830188679E-2 -#define ATANH_MAC55 1.8181818181818181818181818181818181818181818181818181818181818181818182E-2 -#define ATANH_MAC57 1.7543859649122807017543859649122807017543859649122807017543859649122807E-2 -#define ATANH_MAC59 1.6949152542372881355932203389830508474576271186440677966101694915254237E-2 -#endif - - -static __inline vector double _atanhd2(vector double x) -{ - vec_uchar16 dup_even = ((vec_uchar16) { 0,1,2,3, 0,1,2,3, 8,9,10,11, 8,9,10,11 }); - vec_double2 sign_mask = spu_splats(-0.0); - vec_double2 oned = spu_splats(1.0); - vec_double2 onehalfd = spu_splats(0.5); - vec_uint4 infminus1 = spu_splats(0x7FEFFFFFU); - vec_uint4 isinfnan; - vec_uint4 xabshigh; - vec_double2 xabs, xsqu; - /* Where we switch from maclaurin to formula */ - vec_float4 switch_approx = spu_splats(0.08f); - vec_uint4 use_form; - vec_float4 xf; - vec_double2 result, fresult, mresult;; - - xabs = spu_andc(x, sign_mask); - xsqu = spu_mul(x, x); - - xf = spu_roundtf(xabs); - xf = spu_shuffle(xf, xf, dup_even); - - /* - * Formula: - * atanh = 1/2 * ln((1 + x)/(1 - x)) = 1/2 * [ln(1+x) - ln(1-x)] - */ - fresult = spu_sub(_logd2(spu_add(oned, xabs)), _logd2(spu_sub(oned, xabs))); - fresult = spu_mul(fresult, onehalfd); - - - /* - * Taylor Series - */ - mresult = spu_madd(xsqu, spu_splats(ATANH_MAC13), spu_splats(ATANH_MAC11)); - mresult = spu_madd(xsqu, mresult, spu_splats(ATANH_MAC09)); - mresult = spu_madd(xsqu, mresult, spu_splats(ATANH_MAC07)); - mresult = spu_madd(xsqu, mresult, spu_splats(ATANH_MAC05)); - mresult = spu_madd(xsqu, mresult, spu_splats(ATANH_MAC03)); - mresult = spu_madd(xsqu, mresult, spu_splats(ATANH_MAC01)); - mresult = spu_mul(xabs, mresult); - - - /* - * Choose between series and formula - */ - use_form = spu_cmpgt(xf, switch_approx); - result = spu_sel(mresult, fresult, (vec_ullong2)use_form); - - /* Infinity and NaN */ - xabshigh = (vec_uint4)spu_shuffle(xabs, xabs, dup_even); - isinfnan = spu_cmpgt(xabshigh, infminus1); - result = spu_sel(result, x, (vec_ullong2)isinfnan); - - /* Restore sign - atanh is an anti-symmetric */ - result = spu_sel(result, x, (vec_ullong2)sign_mask); - - return result; -} - -#endif /* _ATANHD2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/atanhf.h b/newlib/libm/machine/spu/headers/atanhf.h deleted file mode 100644 index f838c9f47..000000000 --- a/newlib/libm/machine/spu/headers/atanhf.h +++ /dev/null @@ -1,18 +0,0 @@ -#include "headers/atanhf4.h" -#include "headers/dom_chkf_negone_one.h" - -static __inline float _atanhf(float x) -{ - float res; - vector float vx; - - vx = spu_splats(x); - res = spu_extract(_atanhf4(vx), 0); -#ifndef _IEEE_LIBM - /* - * Domain error if not in the interval [-1, +1] - */ - dom_chkf_negone_one(vx); -#endif - return res; -} diff --git a/newlib/libm/machine/spu/headers/atanhf4.h b/newlib/libm/machine/spu/headers/atanhf4.h deleted file mode 100644 index d29ef74d4..000000000 --- a/newlib/libm/machine/spu/headers/atanhf4.h +++ /dev/null @@ -1,149 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _ATANHF4_H_ -#define _ATANHF4_H_ 1 - -#include -#include "logf4.h" - -/* - * FUNCTION - * vector float _atanhf4(vector float x) - * - * DESCRIPTION - * The atanhf4 function returns a vector containing the hyperbolic - * arctangents of the corresponding elements of the input vector. - * - * We are using the formula: - * atanh x = 1/2 * ln((1 + x)/(1 - x)) = 1/2 * [ln(1+x) - ln(1-x)] - * and the anti-symmetry of atanh. - * - * For x near 0, we use the Taylor series: - * atanh x = x + x^3/3 + x^5/5 + x^7/7 + x^9/9 + ... - * - * Special Cases: - * - atanh(1) = HUGE_VALF - * - atanh(-1) = -HUGE_VALF - * - The result is undefined for x outside of the domain [-1,1], - * since single-precision NaN is not supported on the SPU. - * - */ - -/* - * Maclaurin Series Coefficients - * for x near 0. - */ -#define ATANH_MAC01 1.0000000000000000000000000000000000000000000000000000000000000000000000E0 -#define ATANH_MAC03 3.3333333333333333333333333333333333333333333333333333333333333333333333E-1 -#define ATANH_MAC05 2.0000000000000000000000000000000000000000000000000000000000000000000000E-1 -#define ATANH_MAC07 1.4285714285714285714285714285714285714285714285714285714285714285714286E-1 -#if 0 -#define ATANH_MAC09 1.1111111111111111111111111111111111111111111111111111111111111111111111E-1 -#define ATANH_MAC11 9.0909090909090909090909090909090909090909090909090909090909090909090909E-2 -#define ATANH_MAC13 7.6923076923076923076923076923076923076923076923076923076923076923076923E-2 -#define ATANH_MAC15 6.6666666666666666666666666666666666666666666666666666666666666666666667E-2 -#define ATANH_MAC17 5.8823529411764705882352941176470588235294117647058823529411764705882353E-2 -#define ATANH_MAC19 5.2631578947368421052631578947368421052631578947368421052631578947368421E-2 -#define ATANH_MAC21 4.7619047619047619047619047619047619047619047619047619047619047619047619E-2 -#define ATANH_MAC23 4.3478260869565217391304347826086956521739130434782608695652173913043478E-2 -#define ATANH_MAC25 4.0000000000000000000000000000000000000000000000000000000000000000000000E-2 -#define ATANH_MAC27 3.7037037037037037037037037037037037037037037037037037037037037037037037E-2 -#define ATANH_MAC29 3.4482758620689655172413793103448275862068965517241379310344827586206897E-2 -#endif - - -static __inline vector float _atanhf4(vector float x) -{ - vec_float4 sign_mask = spu_splats(-0.0f); - vec_float4 onef = spu_splats(1.0f); - vec_float4 onehalff = spu_splats(0.5f); - vec_float4 result, fresult, mresult;; - vec_float4 xabs, xsqu; - /* Where we switch from maclaurin to formula */ - //vec_float4 switch_approx = spu_splats(0.4661f); - vec_float4 switch_approx = spu_splats(0.165f); - vec_uint4 use_form; - - xabs = spu_andc(x, sign_mask); - xsqu = spu_mul(x, x); - - /* - * Formula: - * atanh = 1/2 * ln((1 + x)/(1 - x)) = 1/2 * [ln(1+x) - ln(1-x)] - */ - fresult = spu_sub(_logf4(spu_add(onef, xabs)), _logf4(spu_sub(onef, xabs))); - fresult = spu_mul(fresult, onehalff); - - - /* - * Taylor Series - */ - mresult = spu_madd(xsqu, spu_splats((float)ATANH_MAC07), spu_splats((float)ATANH_MAC05)); - mresult = spu_madd(xsqu, mresult, spu_splats((float)ATANH_MAC03)); - mresult = spu_madd(xsqu, mresult, spu_splats((float)ATANH_MAC01)); - mresult = spu_mul(xabs, mresult); - - - /* - * Choose between series and formula - */ - use_form = spu_cmpgt(xabs, switch_approx); - result = spu_sel(mresult, fresult, use_form); - - - /* Preserve sign - atanh is anti-symmetric */ - result = spu_sel(result, x, (vec_uint4)sign_mask); - - return result; -} - -#endif /* _ATANHF4_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/cbrt.h b/newlib/libm/machine/spu/headers/cbrt.h deleted file mode 100644 index de0977028..000000000 --- a/newlib/libm/machine/spu/headers/cbrt.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ - -#ifndef _CBRT_H_ -#define _CBRT_H_ 1 - -#include -#include "headers/vec_literal.h" - -extern double cbrt_factors[5]; - -/* Compute the cube root of x to double precision. - */ - -static __inline double _cbrt(double x) -{ - vec_int4 exp, bias; - vec_uint4 e_div_3, e_mod_3; - vec_float4 bf, inv_bf; - vec_float4 onef = VEC_SPLAT_F32(1.0f); - vec_ullong2 mask; - vec_ullong2 mant_mask = VEC_SPLAT_U64(0xFFFFFFFFFFFFFULL); - vec_double2 one = VEC_SPLAT_F64(1.0); - vec_double2 two = VEC_SPLAT_F64(2.0); - vec_double2 half = VEC_SPLAT_F64(0.5); - /* Polynomial coefficients */ - vec_double2 c0 = VEC_SPLAT_F64(0.354895765043919860); - vec_double2 c1 = VEC_SPLAT_F64(1.50819193781584896); - vec_double2 c2 = VEC_SPLAT_F64(-2.11499494167371287); - vec_double2 c3 = VEC_SPLAT_F64(2.44693122563534430); - vec_double2 c4 = VEC_SPLAT_F64(-1.83469277483613086); - vec_double2 c5 = VEC_SPLAT_F64(0.784932344976639262); - vec_double2 c6 = VEC_SPLAT_F64(0.145263899385486377); - vec_double2 in, out, mant, u, u3, ym, a, b, factor, inv_b; - - in = spu_promote(x, 0); - - /* Normalize the mantissa (fraction part) into the range [0.5, 1.0) and - * extract the exponent. - */ - mant = spu_sel(half, in, mant_mask); - exp = spu_and(spu_rlmask((vec_int4)in, -20), 0x7FF); - - /* Generate mask used to zero result if the exponent is zero (ie, is - * either zero or a denorm - */ - mask = (vec_ullong2)spu_cmpeq(exp, 0); - mask = spu_shuffle(mask, mask, VEC_LITERAL(vec_uchar16, 0,1,2,3,0,1,2,3,8,9,10,11,8,9,10,11)); - exp = spu_add(exp, -1022); - - u = spu_madd(mant, spu_madd(mant, spu_madd(mant, spu_madd(mant, spu_madd(mant, spu_nmsub(mant, c6, c5), c4), c3), c2), c1), c0); - u3 = spu_mul(spu_mul(u, u), u); - - /* Compute: e_div_3 = exp/3 - * - * Fetch: factor = factor[2+exp%3] - * - * The factors array contains 5 values: 2^(-2/3), 2^(-1/3), 2^0, 2^(1/3), - * 2^(2/3), 2^1. - * The fetch is done using shuffle bytes so that is can easily be extended - * to support SIMD compution. - */ - bias = spu_rlmask(spu_rlmaska(exp, -15), -16); - e_div_3 = (vec_uint4)spu_rlmaska(spu_madd((vec_short8)exp, VEC_SPLAT_S16(0x5556), bias), -16); - - e_mod_3 = (vec_uint4)spu_sub((vec_int4)(exp), spu_mulo((vec_short8)e_div_3, VEC_SPLAT_S16(3))); - - factor = spu_promote(cbrt_factors[2+spu_extract(e_mod_3, 0)], 0); - - /* Compute the estimated mantissa cube root (ym) equals: - * ym = (u * factor * (2.0 * mant + u3)) / (2.0 * u3 + mant); - */ - a = spu_mul(spu_mul(factor, u), spu_madd(two, mant, u3)); - b = spu_madd(two, u3, mant); - - bf = spu_roundtf(b); - inv_bf = spu_re(bf); - inv_bf = spu_madd(spu_nmsub(bf, inv_bf, onef), inv_bf, inv_bf); - - inv_b = spu_extend(inv_bf); - inv_b = spu_madd(spu_nmsub(b, inv_b, one), inv_b, inv_b); - - ym = spu_mul(a, inv_b); - ym = spu_madd(spu_nmsub(b, ym, a), inv_b, ym); - - /* Merge sign, computed exponent, and computed mantissa. - */ - exp = spu_rl(spu_add((vec_int4)e_div_3, 1023), 20); - exp = spu_andc(exp, (vec_int4)mant_mask); - out = spu_sel((vec_double2)exp, in, VEC_SPLAT_U64(0x8000000000000000ULL)); - out = spu_mul(out, ym); - - out = spu_andc(out, (vec_double2)mask); - - return (spu_extract(out, 0)); -} - -#endif /* _CBRT_H_ */ diff --git a/newlib/libm/machine/spu/headers/cbrtf.h b/newlib/libm/machine/spu/headers/cbrtf.h deleted file mode 100644 index fb9553ad7..000000000 --- a/newlib/libm/machine/spu/headers/cbrtf.h +++ /dev/null @@ -1,124 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _CBRTF_H_ -#define _CBRTF_H_ 1 - -#include -#include "headers/vec_literal.h" - -extern double cbrt_factors[5]; - -/* Compute the cube root of the floating point input x. - */ - -static __inline float _cbrtf(float x) -{ - vec_int4 exp, bias; - vec_uint4 mask, e_div_3, e_mod_3; - vec_uint4 mant_mask = VEC_SPLAT_U32(0x7FFFFF); - vec_float4 in; - vec_float4 half = VEC_SPLAT_F32(0.5f); - vec_float4 onef = VEC_SPLAT_F32(1.0f); - vec_float4 out, mant, ym, bf, inv_bf; - vec_double2 two = VEC_SPLAT_F64(2.0); - /* Polynomial coefficients */ - vec_double2 c2 = VEC_SPLAT_F64(0.191502161678719066); - vec_double2 c1 = VEC_SPLAT_F64(0.697570460207922770); - vec_double2 c0 = VEC_SPLAT_F64(0.492659620528969547); - vec_double2 a0, b0, inv_b0, ym0; - vec_double2 mant0, u0, u0_3, factor0; - - in = spu_promote(x, 0); - - /* Normalize the mantissa (fraction part) into the range [0.5, 1.0) and - * extract the exponent. - */ - mant = spu_sel(half, in, mant_mask); - exp = spu_and(spu_rlmask((vec_int4)in, -23), 0xFF); - - /* Generate mask used to zero result if the exponent is zero (ie, in is either - * zero or a denorm - */ - mask = spu_cmpeq(exp, 0); - exp = spu_add(exp, -126); - - mant0 = spu_extend(mant); - - u0 = spu_madd(mant0, spu_nmsub(mant0, c2, c1), c0); - u0_3 = spu_mul(spu_mul(u0, u0), u0); - - /* Compute: e_div_3 = exp/3 - * - * Fetch: factor = factor[2+exp%3] - * - * The factors array contains 5 values: 2^(-2/3), 2^(-1/3), 2^0, 2^(1/3), 2^(2/3), 2^1. - */ - bias = spu_rlmask(spu_rlmaska(exp, -15), -16); - e_div_3 = (vec_uint4)spu_rlmaska(spu_madd((vec_short8)exp, VEC_SPLAT_S16(0x5556), bias), -16); - - e_mod_3 = (vec_uint4)spu_sub((vec_int4)(exp), spu_mulo((vec_short8)e_div_3, VEC_SPLAT_S16(3))); - - e_mod_3 = spu_add(e_mod_3, 2); - - factor0 = spu_promote(cbrt_factors[spu_extract(e_mod_3, 0)], 0); - - /* Compute the estimated mantissa cube root (ym) equals: - * ym = (u * factor * (2.0 * mant + u3)) / (2.0 * u3 + mant); - */ - a0 = spu_mul(spu_mul(factor0, u0), spu_madd(two, mant0, u0_3)); - b0 = spu_madd(two, u0_3, mant0); - - bf = spu_roundtf(b0); - - inv_bf = spu_re(bf); - inv_bf = spu_madd(spu_nmsub(bf, inv_bf, onef), inv_bf, inv_bf); - - inv_b0 = spu_extend(inv_bf); - - ym0 = spu_mul(a0, inv_b0); - ym0 = spu_madd(spu_nmsub(b0, ym0, a0), inv_b0, ym0); - - ym = spu_roundtf(ym0); - - /* Merge sign, computed exponent, and computed mantissa. - */ - exp = spu_rl(spu_add((vec_int4)e_div_3, 127), 23); - out = spu_sel((vec_float4)exp, in, VEC_SPLAT_U32(0x80000000)); - out = spu_mul(out, ym); - - out = spu_andc(out, (vec_float4)mask); - - return (spu_extract(out, 0)); -} - -#endif /* _CBRTF_H_ */ diff --git a/newlib/libm/machine/spu/headers/ceil.h b/newlib/libm/machine/spu/headers/ceil.h deleted file mode 100644 index b51f26bcd..000000000 --- a/newlib/libm/machine/spu/headers/ceil.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _CEIL_H_ -#define _CEIL_H_ 1 - -#include -#include "headers/vec_literal.h" - -/* Round the input upwards to the nearest integer. - */ - - -static __inline double _ceil(double x) -{ - vec_uchar16 swap_words = VEC_LITERAL(vec_uchar16, 4,5,6,7, 0,1,2,3, 12,13,14,15, 8,9,10,11); - vec_uchar16 splat_hi = VEC_LITERAL(vec_uchar16, 0,1,2,3,0,1,2,3, 8,9,10,11, 8,9,10,11); - vec_uint4 one = VEC_LITERAL(vec_uint4, 0, 1, 0, 1); - vec_int4 exp, shift; - vec_uint4 mask, mask_1, frac_mask, addend, insert, pos, equal0; - vec_ullong2 sign = VEC_SPLAT_U64(0x8000000000000000ULL); - vec_double2 in, in_hi, out; - vec_double2 one_d = VEC_SPLAT_F64(1.0); - - in = spu_promote(x, 0); - - /* This function generates the following component - * based upon the inputs. - * - * mask = bits of the input that need to be replaced. - * insert = value of the bits that need to be replaced - * addend = value to be added to perform function. - * - * These are applied as follows:. - * - * out = ((in & mask) | insert) + addend - */ - in_hi = spu_shuffle(in, in, splat_hi); - pos = spu_cmpgt((vec_int4)in_hi, -1); - exp = spu_and(spu_rlmask((vec_int4)in_hi, -20), 0x7FF); - shift = spu_sub(VEC_LITERAL(vec_int4, 1023, 1043, 1023, 1043), exp); - - /* clamp shift to the range 0 to -31. - */ - shift = spu_sel(VEC_SPLAT_S32(-32), spu_andc(shift, (vec_int4)spu_cmpgt(shift, 0)), spu_cmpgt(shift, -32)); - - frac_mask = spu_rlmask(VEC_LITERAL(vec_uint4, 0xFFFFF, -1, 0xFFFFF, -1), shift); - mask = spu_orc(frac_mask, spu_cmpgt(exp, 0x3FE)); - - /* addend = ((in & mask) && (in >= 0)) ? mask+1 : 0 - */ - mask_1 = spu_addx(mask, one, spu_rlqwbyte(spu_genc(mask, one), 4)); - - equal0 = spu_cmpeq(spu_and((vec_uint4)in, mask), 0); - addend = spu_andc(spu_and(mask_1, pos), spu_and(equal0, spu_shuffle(equal0, equal0, swap_words))); - - insert = spu_andc(spu_and(pos, (vec_uint4)one_d), - spu_cmpgt((vec_uint4)spu_add(exp, -1), 1022)); - - in = spu_sel(in, (vec_double2)insert, spu_andc((vec_ullong2)mask, sign)); - out = (vec_double2)spu_addx((vec_uint4)in, addend, spu_rlqwbyte(spu_genc((vec_uint4)in, addend), 4)); - - return (spu_extract(out, 0)); -} - -#endif /* _CEIL_H */ diff --git a/newlib/libm/machine/spu/headers/ceilf.h b/newlib/libm/machine/spu/headers/ceilf.h deleted file mode 100644 index deb900f4e..000000000 --- a/newlib/libm/machine/spu/headers/ceilf.h +++ /dev/null @@ -1,123 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _CEILF_H_ -#define _CEILF_H_ 1 - -#include -#include "headers/vec_literal.h" - -/* - * FUNCTION - * float _ceilf(float value) - * - * DESCRIPTION - * The _ceilf routine round the input value "value" upwards to the - * nearest integer returning the result as a float. Two forms of the - * ceiling function are provided - full range and limited (integer) - * range. - * - * The full range form (default) provides ceiling computation on - * all IEEE floating point values. The ceiling of NANs remain NANs. - * The ceiling of denorms results in zero. - * - * The limited range form (selected by defining CEIL_INTEGER_RANGE) - * compute ths ceiling of all floating-point values in the 32-bit - * signed integer range. Values outside this range get clamped. - */ - -static __inline float _ceilf(float value) -{ -#ifdef CEIL_INTEGER_RANGE - /* 32-BIT INTEGER DYNAMIC RANGE - */ - union { - float f; - signed int i; - unsigned int ui; - } bias; - - bias.f = value; - - /* If positive, bias the input value to truncate towards - * positive infinity, instead of zero. - */ - bias.ui = ~(unsigned int)(bias.i >> 31) & 0x3F7FFFFF; - value += bias.f; - - /* Remove fraction bits by casting to an integer and back - * to a floating-point value. - */ - return ((float)((int)value)); - -#else /* !CEIL_INTEGER_RANGE */ - /* FULL FLOATING-POINT RANGE - */ - vec_int4 exp, shift; - vec_uint4 mask, frac_mask, addend, insert, pos; - vec_float4 in, out; - vec_float4 one = VEC_SPLAT_F32(1.0f); - - in = spu_promote(value, 0); - - /* This function generates the following component - * based upon the inputs. - * - * mask = bits of the input that need to be replaced. - * insert = value of the bits that need to be replaced - * addend = value to be added to perform function. - * - * These are applied as follows:. - * - * out = ((in & mask) | insert) + addend - */ - pos = spu_cmpgt((vec_int4)in, -1); - exp = spu_and(spu_rlmask((vec_int4)in, -23), 0xFF); - - shift = spu_sub(127, exp); - - frac_mask = spu_and(spu_rlmask(VEC_SPLAT_U32(0x7FFFFF), shift), - spu_cmpgt((vec_int4)shift, -31)); - - mask = spu_orc(frac_mask, spu_cmpgt(exp, 126)); - - addend = spu_andc(spu_and(spu_add(mask, 1), pos), spu_cmpeq(spu_and((vec_uint4)in, mask), 0)); - - insert = spu_andc(spu_and(pos, (vec_uint4)one), - spu_cmpgt((vec_uint4)spu_add(exp, -1), 126)); - - out = (vec_float4)spu_add(spu_sel((vec_uint4)in, insert, mask), addend); - - return (spu_extract(out, 0)); -#endif /* CEIL_INTEGER_RANGE */ -} -#endif /* _CEILF_H_ */ diff --git a/newlib/libm/machine/spu/headers/copysign.h b/newlib/libm/machine/spu/headers/copysign.h deleted file mode 100644 index ba1c64a5c..000000000 --- a/newlib/libm/machine/spu/headers/copysign.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _COPYSIGN_H_ -#define _COPYSIGN_H_ 1 - -#include -#include "headers/vec_literal.h" - -/* copysign - produces a value with the magnitude of x and the - * sign of y. - */ -static __inline double _copysign(double x, double y) -{ - return (spu_extract(spu_sel(spu_promote(x, 0), spu_promote(y, 0), - VEC_SPLAT_U64(0x8000000000000000ULL)), 0)); -} - -#endif /* _COPYSIGN_H_ */ diff --git a/newlib/libm/machine/spu/headers/copysignf.h b/newlib/libm/machine/spu/headers/copysignf.h deleted file mode 100644 index 490cf0f02..000000000 --- a/newlib/libm/machine/spu/headers/copysignf.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _COPYSIGNF_H_ -#define _COPYSIGNF_H_ 1 - -#include -#include "headers/vec_literal.h" - -/* copysign - produces a value with the magnitude of x and the - * sign of y. - */ -static __inline float _copysignf(float x, float y) -{ - return (spu_extract(spu_sel(spu_promote(x, 0), spu_promote(y, 0), - VEC_SPLAT_U32(0x80000000)), 0)); -} - -#endif /* _COPYSIGNF_H_ */ diff --git a/newlib/libm/machine/spu/headers/cos.h b/newlib/libm/machine/spu/headers/cos.h deleted file mode 100644 index b72086233..000000000 --- a/newlib/libm/machine/spu/headers/cos.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/cosd2.h" - -static __inline double _cos(double angle) -{ - return spu_extract(_cosd2(spu_promote(angle, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/cos_sin.h b/newlib/libm/machine/spu/headers/cos_sin.h deleted file mode 100644 index 4769d06a3..000000000 --- a/newlib/libm/machine/spu/headers/cos_sin.h +++ /dev/null @@ -1,216 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _COS_SIN_H_ -#define _COS_SIN_H_ 1 - -#define M_PI_OVER_4_HI_32 0x3fe921fb - -#define M_PI_OVER_4 0.78539816339744827900 -#define M_FOUR_OVER_PI 1.27323954478442180616 - -#define M_PI_OVER_2 1.57079632679489655800 -#define M_PI_OVER_2_HI 1.57079632673412561417 -#define M_PI_OVER_2_LO 0.0000000000607710050650619224932 - -#define M_PI_OVER_2F_HI 1.570312500000000000 -#define M_PI_OVER_2F_LO 0.000483826794896558 - -/* The following coefficients correspond to the Taylor series - * coefficients for cos and sin. - */ -#define COS_14 -0.00000000001138218794258068723867 -#define COS_12 0.000000002087614008917893178252 -#define COS_10 -0.0000002755731724204127572108 -#define COS_08 0.00002480158729870839541888 -#define COS_06 -0.001388888888888735934799 -#define COS_04 0.04166666666666666534980 -#define COS_02 -0.5000000000000000000000 -#define COS_00 1.0 - -#define SIN_15 -0.00000000000076471637318198164759 -#define SIN_13 0.00000000016059043836821614599 -#define SIN_11 -0.000000025052108385441718775 -#define SIN_09 0.0000027557319223985890653 -#define SIN_07 -0.0001984126984126984127 -#define SIN_05 0.008333333333333333333 -#define SIN_03 -0.16666666666666666666 -#define SIN_01 1.0 - - -/* Compute the following for each floating point element of x. - * x = fmod(x, PI/4); - * ix = (int)x * PI/4; - * This allows one to compute cos / sin over the limited range - * and select the sign and correct result based upon the octant - * of the original angle (as defined by the ix result). - * - * Expected Inputs Types: - * x = vec_float4 - * ix = vec_int4 - */ -#define MOD_PI_OVER_FOUR_F(_x, _ix) { \ - vec_float4 fx; \ - \ - _ix = spu_convts(spu_mul(_x, spu_splats((float)M_FOUR_OVER_PI)), 0); \ - _ix = spu_add(_ix, spu_add(spu_rlmaska((vec_int4)_x, -31), 1)); \ - \ - fx = spu_convtf(spu_rlmaska(_ix, -1), 0); \ - _x = spu_nmsub(fx, spu_splats((float)M_PI_OVER_2F_HI), _x); \ - _x = spu_nmsub(fx, spu_splats((float)M_PI_OVER_2F_LO), _x); \ - } - -/* Double precision MOD_PI_OVER_FOUR - * - * Expected Inputs Types: - * x = vec_double2 - * ix = vec_int4 - */ -#define MOD_PI_OVER_FOUR(_x, _ix) { \ - vec_float4 fx; \ - vec_double2 dix; \ - \ - fx = spu_roundtf(spu_mul(_x, spu_splats(M_FOUR_OVER_PI))); \ - _ix = spu_convts(fx, 0); \ - _ix = spu_add(_ix, spu_add(spu_rlmaska((vec_int4)fx, -31), 1)); \ - \ - dix = spu_extend(spu_convtf(spu_rlmaska(_ix, -1), 0)); \ - _x = spu_nmsub(spu_splats(M_PI_OVER_2_HI), dix, _x); \ - _x = spu_nmsub(spu_splats(M_PI_OVER_2_LO), dix, _x); \ - } - - -/* Compute the cos(x) and sin(x) for the range reduced angle x. - * In order to compute these trig functions to full single precision - * accuracy, we solve the Taylor series. - * - * c = cos(x) = 1 - x^2/2! + x^4/4! - x^6/6! + x^8/8! - x^10/10! - * s = sin(x) = x - x^3/4! + x^5/5! - x^7/7! + x^9/9! - x^11/11! - * - * Expected Inputs Types: - * x = vec_float4 - * c = vec_float4 - * s = vec_float4 - */ - -#define COMPUTE_COS_SIN_F(_x, _c, _s) { \ - vec_float4 x2, x4, x6; \ - vec_float4 cos_hi, cos_lo; \ - vec_float4 sin_hi, sin_lo; \ - \ - x2 = spu_mul(_x, _x); \ - x4 = spu_mul(x2, x2); \ - x6 = spu_mul(x2, x4); \ - \ - cos_hi = spu_madd(spu_splats((float)COS_10), x2, spu_splats((float)COS_08)); \ - cos_lo = spu_madd(spu_splats((float)COS_04), x2, spu_splats((float)COS_02)); \ - cos_hi = spu_madd(cos_hi, x2, spu_splats((float)COS_06)); \ - cos_lo = spu_madd(cos_lo, x2, spu_splats((float)COS_00)); \ - _c = spu_madd(cos_hi, x6, cos_lo); \ - \ - sin_hi = spu_madd(spu_splats((float)SIN_11), x2, spu_splats((float)SIN_09)); \ - sin_lo = spu_madd(spu_splats((float)SIN_05), x2, spu_splats((float)SIN_03)); \ - sin_hi = spu_madd(sin_hi, x2, spu_splats((float)SIN_07)); \ - sin_lo = spu_madd(sin_lo, x2, spu_splats((float)SIN_01)); \ - _s = spu_madd(sin_hi, x6, sin_lo); \ - _s = spu_mul(_s, _x); \ - } - - -/* Compute the cos(x) and sin(x) for the range reduced angle x. - * This version computes the cosine and sine to double precision - * accuracy using the Taylor series: - * - * c = cos(x) = 1 - x^2/2! + x^4/4! - x^6/6! + x^8/8! - x^10/10! + x^12/12! - x^14/14! - * s = sin(x) = x - x^3/4! + x^5/5! - x^7/7! + x^9/9! - x^11/11! + x^13/13! - x^15/15! - * - * Expected Inputs Types: - * x = vec_double2 - * c = vec_double2 - * s = vec_double2 - */ - -#define COMPUTE_COS_SIN(_x, _c, _s) { \ - vec_double2 x2, x4, x8; \ - vec_double2 cos_hi, cos_lo; \ - vec_double2 sin_hi, sin_lo; \ - \ - x2 = spu_mul(_x, _x); \ - x4 = spu_mul(x2, x2); \ - x8 = spu_mul(x4, x4); \ - \ - cos_hi = spu_madd(spu_splats(COS_14), x2, spu_splats(COS_12)); \ - cos_lo = spu_madd(spu_splats(COS_06), x2, spu_splats(COS_04)); \ - cos_hi = spu_madd(cos_hi, x2, spu_splats(COS_10)); \ - cos_lo = spu_madd(cos_lo, x2, spu_splats(COS_02)); \ - cos_hi = spu_madd(cos_hi, x2, spu_splats(COS_08)); \ - cos_lo = spu_madd(cos_lo, x2, spu_splats(COS_00)); \ - _c = spu_madd(cos_hi, x8, cos_lo); \ - \ - sin_hi = spu_madd(spu_splats(SIN_15), x2, spu_splats(SIN_13)); \ - sin_lo = spu_madd(spu_splats(SIN_07), x2, spu_splats(SIN_05)); \ - sin_hi = spu_madd(sin_hi, x2, spu_splats(SIN_11)); \ - sin_lo = spu_madd(sin_lo, x2, spu_splats(SIN_03)); \ - sin_hi = spu_madd(sin_hi, x2, spu_splats(SIN_09)); \ - sin_lo = spu_madd(sin_lo, x2, spu_splats(SIN_01)); \ - _s = spu_madd(sin_hi, x8, sin_lo); \ - _s = spu_mul(_s, _x); \ - } - - - - -#endif /* _COS_SIN_H_ */ -#endif /* __SPU__ */ - - diff --git a/newlib/libm/machine/spu/headers/cosd2.h b/newlib/libm/machine/spu/headers/cosd2.h deleted file mode 100644 index 3ca12efd1..000000000 --- a/newlib/libm/machine/spu/headers/cosd2.h +++ /dev/null @@ -1,109 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ - -#ifndef _COSD2_H_ -#define _COSD2_H_ 1 - -#include - -#include "cos_sin.h" - -/* - * FUNCTION - * vector double _cosd2(vector double angle) - * - * DESCRIPTION - * _cosd2 computes the cosine of a vector of angles (expressed - * in radians) to an accuracy of a double precision floating point. - */ -static __inline vector double _cosd2(vector double angle) -{ - vec_int4 octant; - vec_ullong2 select; - vec_double2 cos, sin; - vec_double2 toggle_sign, answer; - - /* Range reduce the input angle x into the range -PI/4 to PI/4 - * by performing simple modulus. - */ - MOD_PI_OVER_FOUR(angle, octant); - - /* Compute the cosine and sine of the range reduced input. - */ - COMPUTE_COS_SIN(angle, cos, sin); - - /* For each SIMD element, select which result (cos or sin) to use - * with a sign correction depending upon the octant of the original - * angle (Maclaurin series). - * - * octants angles select sign toggle - * ------- ------------ ------ ----------- - * 0 0 to 45 cos no - * 1,2 45 to 135 sin yes - * 3,4 135 to 225 cos yes - * 5,6 225 to 315 sin no - * 7 315 to 360 cos no - */ - octant = spu_shuffle(octant, octant, ((vec_uchar16) { 0,1, 2, 3, 0,1, 2, 3, 8,9,10,11, 8,9,10,11 })); - - toggle_sign = (vec_double2)spu_sl(spu_and(spu_add(octant, 2), 4), ((vec_uint4) { 29,32,29,32 })); - select = (vec_ullong2)spu_cmpeq(spu_and(octant, 2), 0); - - answer = spu_xor(spu_sel(sin, cos, select), toggle_sign); - - return (answer); -} - -#endif /* _COSD2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/cosf.h b/newlib/libm/machine/spu/headers/cosf.h deleted file mode 100644 index 49e6f716f..000000000 --- a/newlib/libm/machine/spu/headers/cosf.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/cosf4.h" - -static __inline float _cosf(float angle) -{ - return spu_extract(_cosf4(spu_promote(angle, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/cosf4.h b/newlib/libm/machine/spu/headers/cosf4.h deleted file mode 100644 index 693c12219..000000000 --- a/newlib/libm/machine/spu/headers/cosf4.h +++ /dev/null @@ -1,111 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ - -#ifndef _COSF4_H_ -#define _COSF4_H_ 1 - - -#include - -#include "cos_sin.h" - -/* - * FUNCTION - * vector float _cosf4(vector float angle) - * - * DESCRIPTION - * The _cosf4 function computes the cosine of a vector of angles - * (expressed in radians) to an accuracy of single precision floating - * point. - * - */ -static __inline vector float _cosf4(vector float angle) -{ - vec_int4 octant; - vec_uint4 select; - vec_float4 cos, sin; - vec_float4 toggle_sign, answer; - - /* Range reduce the input angle x into the range -PI/4 to PI/4 - * by performing simple modulus. - */ - MOD_PI_OVER_FOUR_F(angle, octant); - - /* Compute the cosine and sine of the range reduced input. - */ - COMPUTE_COS_SIN_F(angle, cos, sin); - - /* For each SIMD element, select which result (cos or sin) to use - * with a sign correction depending upon the octant of the original - * angle (Maclaurin series). - * - * octants angles select sign toggle - * ------- ------------ ------ ----------- - * 0 0 to 45 cos no - * 1,2 45 to 135 sin yes - * 3,4 135 to 225 cos yes - * 5,6 225 to 315 sin no - * 7 315 to 360 cos no - */ - toggle_sign = (vec_float4)spu_sl(spu_and(spu_add(octant, 2), 4), 29); - select = spu_cmpeq(spu_and(octant, 2), 0); - - answer = spu_xor(spu_sel(sin, cos, select), toggle_sign); - - return (answer); - -} - -#endif /* _COSF4_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/cosh.h b/newlib/libm/machine/spu/headers/cosh.h deleted file mode 100644 index 7b8875a08..000000000 --- a/newlib/libm/machine/spu/headers/cosh.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/coshd2.h" - -static __inline double _cosh(double x) -{ - return spu_extract(_coshd2(spu_promote(x, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/coshd2.h b/newlib/libm/machine/spu/headers/coshd2.h deleted file mode 100644 index e68d134fb..000000000 --- a/newlib/libm/machine/spu/headers/coshd2.h +++ /dev/null @@ -1,127 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _COSHD2_H_ -#define _COSHD2_H_ 1 - -#include - -#include "expd2.h" -#include "recipd2.h" - -/* - * FUNCTION - * vector float _coshd2(vector double angle) - * - * DESCRIPTION - * _coshd2 computes the hyperbolic cosines of a vector of angles - * (expressed in radians) to an accuracy of a double precision - * floating point. - */ -static __inline vector double _coshd2(vector double x) -{ - - // Coefficents for the power series - vec_double2 f02 = spu_splats(5.00000000000000000000E-1); // 1/(2!) - vec_double2 f04 = spu_splats(4.16666666666666666667E-2); // 1/(4!) - vec_double2 f06 = spu_splats(1.38888888888888888889E-3); // 1/(6!) - vec_double2 f08 = spu_splats(2.48015873015873015873E-5); // 1/(8!) - vec_double2 f10 = spu_splats(2.75573192239858906526E-7); // 1/(10!) - vec_double2 f12 = spu_splats(2.08767569878680989792E-9); // 1/(12!) - vec_double2 f14 = spu_splats(1.14707455977297247139E-11); // 1/(14!) - vec_double2 f16 = spu_splats(4.77947733238738529744E-14); // 1/(16!) - vec_double2 f18 = spu_splats(1.56192069685862264622E-16); // 1/(18!) - vec_double2 f20 = spu_splats(4.11031762331216485848E-19); // 1/(20!) - vec_double2 f22 = spu_splats(8.89679139245057328675E-22); // 1/(22!) - - // Check if the input is within the range [ -1.0 ... 1.0 ] - // If it is, we want to use the power series, otherwise - // we want to use the 0.5 * (e^x + e^-x) - - // round to float, check if within range. Results will be in - // slots 0 and 2, so we rotate right 4 bytes, and "or" with ourself - // to produce 64 bits of all 1's or 0's. - vec_uint4 use_exp = spu_cmpabsgt(spu_roundtf(x),spu_splats(1.0f)); - use_exp = spu_or(use_exp,spu_rlmaskqwbyte(use_exp,-4)); - - - // Perform the calculation of the power series using Horner's method - vec_double2 result; - vec_double2 x2 = spu_mul(x,x); - result = spu_madd(x2,f22,f20); - result = spu_madd(x2,result,f18); - result = spu_madd(x2,result,f16); - result = spu_madd(x2,result,f14); - result = spu_madd(x2,result,f12); - result = spu_madd(x2,result,f10); - result = spu_madd(x2,result,f08); - result = spu_madd(x2,result,f06); - result = spu_madd(x2,result,f04); - result = spu_madd(x2,result,f02); - result = spu_madd(x2,result,spu_splats(1.0)); - - - // Perform calculation as a function of 0.5 * (e^x + e^-x) - vec_double2 ex = _expd2(x); - vec_double2 ex_inv = _recipd2(ex); - - vec_double2 r2= spu_add(ex,ex_inv); - r2 = spu_mul(r2,f02); // we can reuse f02 here - - - // Select either the power series or exp version - result = spu_sel(result,r2,(vec_ullong2)use_exp); - - return result; - -} - -#endif /* _COSHD2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/coshf.h b/newlib/libm/machine/spu/headers/coshf.h deleted file mode 100644 index ae13482ba..000000000 --- a/newlib/libm/machine/spu/headers/coshf.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/coshf4.h" - -static __inline float _coshf(float x) -{ - return spu_extract(_coshf4(spu_promote(x, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/coshf4.h b/newlib/libm/machine/spu/headers/coshf4.h deleted file mode 100644 index ca43748ca..000000000 --- a/newlib/libm/machine/spu/headers/coshf4.h +++ /dev/null @@ -1,112 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _COSHF4_H_ -#define _COSHF4_H_ 1 - -#include - -#include "expf4.h" -#include "recipf4.h" - - -/* - * FUNCTION - * vector float _coshf4(vector float x) - * - * DESCRIPTION - * The _coshf4 function computes the hyperbolic cosines of a vector of - * angles (expressed in radians) to an accuracy of a single precision - * floating point. - * - */ -static __inline vector float _coshf4(vector float x) -{ - // 1.0000 (above this number, use sinh(x) = 0.5 * (e^x - e^-x) - vec_uint4 threshold = (vec_uint4)spu_splats(0x3F800000); - - vec_uint4 sign_mask = (vec_uint4)spu_splats(0x80000000); - - // Coefficents for the Taylor series - vec_float4 f02 = spu_splats(5.0000000000000000E-1f); // 1/2! - vec_float4 f04 = spu_splats(4.1666666666666667E-2f); // 1/4! - vec_float4 f06 = spu_splats(1.3888888888888889E-3f); // 1/6! - vec_float4 f08 = spu_splats(2.4801587301587302E-5f); // 1/8! - vec_float4 f10 = spu_splats(2.7557319223985891E-7f); // 1/10! - vec_float4 f12 = spu_splats(2.0876756987868099E-9f); // 1/12! - - // Perform the calculation as a Taylor series - vec_float4 result; - vector float x2 = spu_mul(x,x); - result = spu_madd(x2,f12,f10); - result = spu_madd(x2,result,f08); - result = spu_madd(x2,result,f06); - result = spu_madd(x2,result,f04); - result = spu_madd(x2,result,f02); - result = spu_madd(x2,result,spu_splats(1.0f)); - - - // Perform calculation as a function of 0.5 * (e^x - e^-x) - vec_float4 ex = _expf4(x); - vec_float4 ex_inv = _recipf4(ex); - - vec_float4 r2= spu_add(ex,ex_inv); - r2 = spu_mul(r2,f02); // we can reused f02 here - - vec_uint4 xabs = spu_andc((vec_uint4)x,sign_mask); - vec_uint4 use_exp = spu_cmpgt(xabs,threshold); - - // Select either the Taylor or exp version - result = spu_sel(result,r2,use_exp); - - return result; -} -#endif /* _COSHF4_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/divd2.h b/newlib/libm/machine/spu/headers/divd2.h deleted file mode 100644 index b04d3c592..000000000 --- a/newlib/libm/machine/spu/headers/divd2.h +++ /dev/null @@ -1,244 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ - -#ifndef _DIVD2_H_ -#define _DIVD2_H_ 1 - -#include - -/* - * FUNCTION - * vector double _divd2(vector double a, vector double b) - * - * DESCRIPTION - * _divd2 divides the vector dividend a by the vector divisor b and - * returns the resulting vector quotient. Maximum error 0.5 ULPS for - * normalized results, 1ulp for denorm results, over entire double - * range including denorms, compared to true result in round-to-nearest - * rounding mode. Handles Inf or NaN operands and results correctly. - */ -static __inline vector double _divd2(vector double a, vector double b) -{ - - - /* Variables - */ - vec_float4 inv_bf, mant_bf; - vec_double2 mant_a, mant_b, inv_b, q0, q1, q2, mult; - vec_int4 exp, tmp; - vec_uint4 exp_a, exp_b, exp_q1, overflow, nounderflow, normal, utmp, - sign_a, sign_b, a_frac, b_frac, a_frac_0, b_frac_0, a_exp_0, b_exp_0, - a_exp_ones, b_exp_ones, a_nan, b_nan, a_inf, b_inf, a_zero, b_zero, - res_nan, sign_res; - - /* Constants - */ - vec_float4 onef = spu_splats(1.0f); - vec_double2 one = spu_splats(1.0); - vec_uint4 exp_mask = (vec_uint4) { 0x7FF00000, 0, 0x7FF00000, 0 }; - vec_uint4 sign_mask = (vec_uint4) { 0x80000000, 0, 0x80000000, 0}; - vec_uint4 sign_exp_mask = (vec_uint4) { 0xFFF00000, 0, 0xFFF00000,0}; - vec_uint4 frac_mask =(vec_uint4) { 0x000FFFFF, 0xFFFFFFFF, 0x000FFFFF, 0xFFFFFFFF }; - vec_uchar16 swap32 = (vec_uchar16) ((vec_uint4) { 0x04050607, 0x00010203, 0x0C0D0E0F, 0x08090A0B} ); - vec_uint4 zero = (vec_uint4) { 0, 0, 0, 0 }; - vec_int4 e1022 = (vec_int4) { 0x000003FE, 0, 0x000003FE, 0 }; - vec_int4 emax = (vec_int4) { 0x000007FE, 0, 0x000007FE, 0 }; - vec_int4 e1 = (vec_int4) { 0x00000001, 0, 0x00000001, 0 }; - - vec_uint4 nan = (vec_uint4) { 0x7FF80000, 0, 0x7FF80000, 0}; - - /* Extract exponents and underflow denorm arguments to signed zero. - */ - exp_a = spu_and((vec_uint4)a, exp_mask); - exp_b = spu_and((vec_uint4)b, exp_mask); - - sign_a = spu_and((vec_uint4)a, sign_mask); - sign_b = spu_and((vec_uint4)b, sign_mask); - - a_exp_0 = spu_cmpeq (exp_a, 0); - utmp = spu_shuffle (a_exp_0, a_exp_0, swap32); - a_exp_0 = spu_and (a_exp_0, utmp); - b_exp_0 = spu_cmpeq (exp_b, 0); - utmp = spu_shuffle (b_exp_0, b_exp_0, swap32); - b_exp_0 = spu_and (b_exp_0, utmp); - - a = spu_sel(a, (vec_double2)sign_a, (vec_ullong2)a_exp_0); - b = spu_sel(b, (vec_double2)sign_b, (vec_ullong2)b_exp_0); - - /* Force the divisor and dividend into the range [1.0,2.0). - (Unless they're zero.) - */ - mant_a = spu_sel(a, one, (vec_ullong2)sign_exp_mask); - mant_b = spu_sel(b, one, (vec_ullong2)sign_exp_mask); - - /* Approximate the single reciprocal of b by using - * the single precision reciprocal estimate followed by one - * single precision iteration of Newton-Raphson. - */ - mant_bf = spu_roundtf(mant_b); - inv_bf = spu_re(mant_bf); - inv_bf = spu_madd(spu_nmsub(mant_bf, inv_bf, onef), inv_bf, inv_bf); - - /* Perform 2 more Newton-Raphson iterations in double precision. - */ - inv_b = spu_extend(inv_bf); - inv_b = spu_madd(spu_nmsub(mant_b, inv_b, one), inv_b, inv_b); - q0 = spu_mul(mant_a, inv_b); - q1 = spu_madd(spu_nmsub(mant_b, q0, mant_a), inv_b, q0); - - /* Compute the quotient's expected exponent. If the exponent - * is out of range, then force the resulting exponent to 0. - * (1023 with the bias). We correct for the out of range - * values by computing a multiplier (mult) that will force the - * result to the correct out of range value and set the - * correct exception flag (UNF, OVF, or neither). - */ - exp_q1 = spu_and((vec_uint4)q1, exp_mask); - exp = spu_sub((vec_int4)exp_a, (vec_int4)exp_b); - exp = spu_rlmaska(exp, -20); // shift right to allow enough bits for working - tmp = spu_rlmaska((vec_int4)exp_q1, -20); - exp = spu_add(exp, tmp); // biased exponent of result (right justified) - - /* The default multiplier is 1.0. If an underflow is detected (the computed - * exponent is less than or equal to a biased 0), force the multiplier to 0.0. - * If exp<=0 set mult = 2**(unbiased exp + 1022) and unbiased exp = -1022 - * = biased 1, the smallest normalized exponent. If exp<-51 set - * mult = 2**(-1074) to ensure underflowing result. Otherwise mult=1. - */ - normal = spu_cmpgt(exp, 0); - nounderflow = spu_cmpgt(exp, -52); - tmp = spu_add(exp, e1022); - mult = (vec_double2)spu_sl(tmp, 20); - mult = spu_sel(mult, one, (vec_ullong2)normal); - mult = spu_sel((vec_double2)e1, mult, (vec_ullong2)nounderflow); - exp = spu_sel(e1, exp, normal); // unbiased -1022 is biased 1 - - /* Force the multiplier to positive infinity (exp_mask) and the biased - * exponent to 1022, if the computed biased exponent is > emax. - */ - overflow = spu_cmpgt(exp, (vec_int4)emax); - exp = spu_sel(exp, (vec_int4)e1022, overflow); - mult = spu_sel(mult, (vec_double2)exp_mask, (vec_ullong2)overflow); - - /* Determine if a, b are Inf, NaN, or zero. - * Since these are rare, it would improve speed if these could be detected - * quickly and a branch used to avoid slowing down the main path. However - * most of the work seems to be in the detection. - */ - a_exp_ones = spu_cmpeq (exp_a, exp_mask); - utmp = spu_shuffle (a_exp_ones, a_exp_ones, swap32); - a_exp_ones = spu_and (a_exp_ones, utmp); - - a_frac = spu_and ((vec_uint4)a, frac_mask); - a_frac_0 = spu_cmpeq (a_frac, 0); - utmp = spu_shuffle (a_frac_0, a_frac_0, swap32); - a_frac_0 = spu_and (a_frac_0, utmp); - - a_zero = spu_and (a_exp_0, a_frac_0); - a_inf = spu_and (a_exp_ones, a_frac_0); - a_nan = spu_andc (a_exp_ones, a_frac_0); - - b_exp_ones = spu_cmpeq (exp_b, exp_mask); - utmp = spu_shuffle (b_exp_ones, b_exp_ones, swap32); - b_exp_ones = spu_and (b_exp_ones, utmp); - - b_frac = spu_and ((vec_uint4)b, frac_mask); - b_frac_0 = spu_cmpeq (b_frac, 0); - utmp = spu_shuffle (b_frac_0, b_frac_0, swap32); - b_frac_0 = spu_and (b_frac_0, utmp); - - b_zero = spu_and (b_exp_0, b_frac_0); - b_inf = spu_and (b_exp_ones, b_frac_0); - b_nan = spu_andc (b_exp_ones, b_frac_0); - - /* Handle exception cases */ - - /* Result is 0 for 0/x, x!=0, or x/Inf, x!=Inf. - * Set mult=0 for 0/0 or Inf/Inf now, since it will be replaced - * with NaN later. - */ - utmp = spu_or (a_zero, b_inf); - mult = spu_sel(mult, (vec_double2)zero, (vec_ullong2)utmp); - - /* Result is Inf for x/0, x!=0. Set mult=Inf for 0/0 now, since it - * will be replaced with NaN later. - */ - mult = spu_sel(mult, (vec_double2)exp_mask, (vec_ullong2)b_zero); - - /* Result is NaN if either operand is, or Inf/Inf, or 0/0. - */ - res_nan = spu_or (a_nan, b_nan); - utmp = spu_and (a_inf, b_inf); - res_nan = spu_or (res_nan, utmp); - utmp = spu_and (a_zero, b_zero); - res_nan = spu_or (res_nan, utmp); - mult = spu_sel(mult, (vec_double2)nan, (vec_ullong2)res_nan); - - /* Insert sign of result into mult. - */ - sign_res = spu_xor (sign_a, sign_b); - mult = spu_or (mult, (vec_double2)sign_res); - - /* Insert the sign and exponent into the result and perform the - * final multiplication. - */ - exp = spu_sl(exp, 20); - q2 = spu_sel(q1, (vec_double2)exp, (vec_ullong2)exp_mask); - q2 = spu_mul(q2, mult); - - return (q2); -} - -#endif /* _DIVD2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/divf4.h b/newlib/libm/machine/spu/headers/divf4.h deleted file mode 100644 index 226ca493c..000000000 --- a/newlib/libm/machine/spu/headers/divf4.h +++ /dev/null @@ -1,172 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _DIVF4_H_ -#define _DIVF4_H_ 1 - -#include - -/* - * FUNCTION - * vector float _divf4(vector float dividend, vector float divisor) - * - * DESCRIPTION - * The _divf4 function divides the vector dividend by the vector divisor - * and returns the resulting vector quotient. - * - */ -static __inline vector float _divf4(vector float a, vector float b) -{ - - /* This function has been designed to provide a - * full function operation that presisely computes - * the quotient for the entire range of extended - * single precision inputs and . This includes: - * - * 1) Computing the quotient to full single precision - * floating point accuracy. - * 2) Round the result consistently with the rounding - * mode of the processor - truncated toward zero. - * 3) Underflow and overflow results are clamped to - * Smin and Smax and flagged with the appropriate - * UNF or OVF exception in the FPSCR. - * 4) Divide By Zero (DBZ) exception is produced when - * the divisor has a zero exponent. A quotient - * of correctly signed Smax is produced. - * 5) Denorm/zero divided by a denorm/zero generates - * a DBZ with the results undefined. - * 6) Resulting denorm quotients will be coerced to +0. - * 7) If a non-compliant IEEE result is produced, the - * a DIFF exception is generated. - */ - - vector float inv_b, err, q0, q1, q2; - vector float mult; - vector float mant_a, mant_b; - vector float one = spu_splats(1.0f); - vector unsigned int exp, exp_a, exp_b, overflow; - vector unsigned int exp_mask = (vec_uint4)spu_splats(0x7F800000); - - /* If b has a zero exponent, then set the divide by zero - * (DBZ) exception flag. The estimate result is discarded. - * Note: This must be implemented as inline assembly. Otherwise - * the optimizer removes it. - */ - (void)si_frest((qword)(b)); - - /* For computing the quotient, force the divisor and - * dividend into the range (1.0 <= 0 < 2.0). - */ - mant_a = spu_sel(a, one, exp_mask); - mant_b = spu_sel(b, one, exp_mask); - - /* Compute the quotient using reciprocal estimate - * followed by one iteration of the Newton-Raphson. - */ - inv_b = spu_re(mant_b); - q0 = spu_mul(mant_a, inv_b); - q1 = spu_nmsub(mant_b, q0, mant_a); - q1 = spu_madd(inv_b, q1, q0); - - /* Due to truncation error, the quotient result - * may be low by 1 ulp (unit of least position), - * Conditionally add one if the estimate is too - * small. - */ - q2 = (vector float)spu_add((vector unsigned int)(q1), 1); - err = spu_nmsub(mant_b, q2, mant_a); - q2 = spu_sel(q1, q2, spu_cmpgt((vector signed int)err, -1)); - - - /* Compute the quotient's expected exponent. If the exponent - * is out of range, then force the resulting exponent to 0. - * (127 with the bias). We correct for the out of range - * values by computing a multiplier (mult) that will force the - * result to the correct out of range value and set the - * correct exception flag (UNF, OVF, or neither). The multiplier - * is also conditioned to generate correctly signed Smax if the - * divisor b is a denorm or zero. - */ - exp_a = spu_and((vector unsigned int)a, exp_mask); - exp_b = spu_and((vector unsigned int)b, exp_mask); - exp = spu_add(spu_sub(spu_add(exp_a, (vector unsigned int)one), exp_b), spu_cmpabsgt(mant_b, mant_a)); - - /* The default multiplier is 1.0. If an underflow is detected (ie, - * either the dividend is a denorm/zero, or the computed exponent is - * less than or equal to a biased 0), force the multiplier to 0.0. - */ - mult = spu_and(one, (vector float)spu_cmpgt((vector signed int)exp, 0)); - - /* Force the multiplier to positive Smax (0x7FFFFFFF) and the biased exponent - * to 127, if the divisor is denorm/zero or the computed biased exponent is - * greater than 255. - */ - - overflow = spu_or(spu_cmpeq(exp_b, 0), spu_cmpeq(spu_rlmask(exp, -30), 2)); - exp = spu_sel(exp, (vector unsigned int)one, overflow); - - mult = spu_or(mult, (vector float)spu_rlmask(overflow, -1)); - mult = spu_andc(mult, (vector float)spu_cmpeq(exp_a, 0)); - - /* Insert the exponent into the result and perform the - * final multiplication. - */ - q2 = spu_sel(q2, (vector float)exp, exp_mask); - q2 = spu_mul(q2, mult); - - return (q2); - -} - -#endif /* _DIVF4_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/dom_chkd_less_than.h b/newlib/libm/machine/spu/headers/dom_chkd_less_than.h deleted file mode 100644 index f7018d62a..000000000 --- a/newlib/libm/machine/spu/headers/dom_chkd_less_than.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - Copyright 2007 - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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 - -/* - * dom_chkd_less_than: "domain check double less than" - * - * Set errno to EDOM if vx < vc. - * - * This is for scalar use only, the input is a vector double, but both - * values in both vectors must be the same. - */ - -static __inline void dom_chkd_less_than (vector double vx, vector double vc) -{ - vector unsigned long long domain; - vector signed int verrno; - vector signed int fail = { EDOM, EDOM, EDOM, EDOM }; - - domain = spu_cmpgt(vc, vx); - verrno = spu_splats(errno); - /* - * domain is 2 long longs, but they have the same value. Even so, no - * special code is needed to extract the scalar errno (we have all ones - * or all zeroes for the preferred scalar slot). - */ - errno = spu_extract(spu_sel(verrno, fail, (vector unsigned int) domain), 0); -} diff --git a/newlib/libm/machine/spu/headers/dom_chkd_negone_one.h b/newlib/libm/machine/spu/headers/dom_chkd_negone_one.h deleted file mode 100644 index e364f86f8..000000000 --- a/newlib/libm/machine/spu/headers/dom_chkd_negone_one.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - Copyright 2007 - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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 - -/* - * dom_chkd_negone_one: "domain check double negative-one and one": - * - * Set errno to EDOM if |x| > 1.0. - * - * This is for scalar use only, the input is a vector double, but both - * values in the vector must be the same. - * - * We *only* set errno, and do not bother setting the actual return value - * of any functions to a NAN. That way, we have the same method for double - * and single precision (there are no float nans for single precision so - * those can't return a nan). - * - * Note that for newlib, errno is/was a function call, so not so obviously - * we are not branchless here. Unknown if adding a branch (and avoiding a - * call to __errno) is faster than this current code. - */ - -static __inline void dom_chkd_negone_one (vector double vx) -{ - vector unsigned long long domain; - vector signed int verrno; - vector double ones = { 1.0, 1.0 }; - vector signed int fail = { EDOM, EDOM, EDOM, EDOM }; - - domain = spu_cmpabsgt(vx, ones); - verrno = spu_splats(errno); - /* - * domain is 2 long longs, but they have the same value. Even so, no - * special code is needed to extract the scalar errno (we have all ones - * or all zeroes for the preferred scalar slot). - */ - errno = spu_extract(spu_sel(verrno, fail, (vector unsigned int) domain), 0); -} diff --git a/newlib/libm/machine/spu/headers/dom_chkf_less_than.h b/newlib/libm/machine/spu/headers/dom_chkf_less_than.h deleted file mode 100644 index 7475b2d91..000000000 --- a/newlib/libm/machine/spu/headers/dom_chkf_less_than.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - Copyright 2007 - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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 - -/* - * dom_chkf_less_than: "domain check float less than" - * - * Set errno to EDOM if vx < vc. - * - * This is for scalar use only, the input is a vector float, but both - * values in both vectors must be the same. - */ - -static __inline void dom_chkf_less_than (vector float vx, vector float vc) -{ - vector unsigned int domain; - vector signed int verrno; - vector signed int fail = { EDOM, EDOM, EDOM, EDOM }; - - domain = spu_cmpgt(vc, vx); - verrno = spu_splats(errno); - /* - * domain is 2 long longs, but they have the same value. Even so, no - * special code is needed to extract the scalar errno (we have all ones - * or all zeroes for the preferred scalar slot). - */ - errno = spu_extract(spu_sel(verrno, fail, (vector unsigned int) domain), 0); -} diff --git a/newlib/libm/machine/spu/headers/dom_chkf_negone_one.h b/newlib/libm/machine/spu/headers/dom_chkf_negone_one.h deleted file mode 100644 index f2671a9df..000000000 --- a/newlib/libm/machine/spu/headers/dom_chkf_negone_one.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - Copyright 2007 - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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 - -/* - * dom_chkf_negone_one: "domain check float negative-one and one": - * - * Set errno to EDOM if |x| > 1.0. - * - * This is for scalar use only, the input is a vector float, but all - * values in the vector must be the same. - * - * We *only* set errno, and do not bother setting the actual return value - * of any functions to a NAN. That way, we have the same method for float - * and single precision (there are no float nans for single precision so - * those can't return a nan). - * - * Note that for newlib, errno is/was a function call, so not so obviously - * we are not branchless here. Unknown if adding a branch (and avoiding a - * call to __errno) is faster than this current code. - */ - -static __inline void dom_chkf_negone_one (vector float vx) -{ - vector unsigned int domain; - vector signed int verrno; - vector float ones = { 1.0, 1.0, 1.0, 1.0 }; - vector signed int fail = { EDOM, EDOM, EDOM, EDOM }; - - domain = spu_cmpabsgt(vx, ones); - verrno = spu_splats(errno); - /* - * domain is 4 ints, but they have the same value, even so no special - * code is needed to extract the scalar errno (we have all ones or all - * zeroes for the preferred scalar slot). - */ - errno = spu_extract(spu_sel(verrno, fail, (vector unsigned int) domain), 0); -} diff --git a/newlib/libm/machine/spu/headers/erf.h b/newlib/libm/machine/spu/headers/erf.h deleted file mode 100644 index c0fbec888..000000000 --- a/newlib/libm/machine/spu/headers/erf.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/erfd2.h" - -static __inline double _erf(double x) -{ - return spu_extract(_erfd2(spu_promote(x, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/erf_utils.h b/newlib/libm/machine/spu/headers/erf_utils.h deleted file mode 100644 index 06edc13db..000000000 --- a/newlib/libm/machine/spu/headers/erf_utils.h +++ /dev/null @@ -1,381 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _ERF_UTILS_H_ -#define _ERF_UTILS_H_ 1 - -#include - - -/* - * This file contains approximation methods for the erf and erfc functions. - */ - - -#define SQRT_PI 1.7724538509055160272981674833411451827975494561223871282138077898529113E0 -#define INV_SQRT_PI 5.6418958354775628694807945156077258584405062932899885684408572171064247E-1 -#define TWO_OVER_SQRT_PI 1.1283791670955125738961589031215451716881012586579977136881714434212849E0 - -/* - * Coefficients of Taylor Series Expansion of Error Function - */ -#define TAYLOR_ERF_00 1.0000000000000000000000000000000000000000000000000000000000000000000000E0 -#define TAYLOR_ERF_01 -3.3333333333333333333333333333333333333333333333333333333333333333333333E-1 -#define TAYLOR_ERF_02 1.0000000000000000000000000000000000000000000000000000000000000000000000E-1 -#define TAYLOR_ERF_03 -2.3809523809523809523809523809523809523809523809523809523809523809523810E-2 -#define TAYLOR_ERF_04 4.6296296296296296296296296296296296296296296296296296296296296296296296E-3 -#define TAYLOR_ERF_05 -7.5757575757575757575757575757575757575757575757575757575757575757575758E-4 -#define TAYLOR_ERF_06 1.0683760683760683760683760683760683760683760683760683760683760683760684E-4 -#define TAYLOR_ERF_07 -1.3227513227513227513227513227513227513227513227513227513227513227513228E-5 -#define TAYLOR_ERF_08 1.4589169000933706816059757236227824463118580765639589169000933706816060E-6 -#define TAYLOR_ERF_09 -1.4503852223150468764503852223150468764503852223150468764503852223150469E-7 -#define TAYLOR_ERF_10 1.3122532963802805072646342487612328882170152011421852691693961535231377E-8 -#define TAYLOR_ERF_11 -1.0892221037148573380457438428452921206544394950192051641327003645844226E-9 -#define TAYLOR_ERF_12 8.3507027951472395916840361284805729250173694618139062583507027951472396E-11 -#define TAYLOR_ERF_13 -5.9477940136376350368119915445018325676761890753660300985403866062302276E-12 -#define TAYLOR_ERF_14 3.9554295164585257633971372340283122987009139171153402133150354277885750E-13 -#define TAYLOR_ERF_15 -2.4668270102644569277100425760606678852113226579859111007771188689434124E-14 -#define TAYLOR_ERF_16 1.4483264643598137264964265124598618265445265605599099265926266086599580E-15 -#define TAYLOR_ERF_17 -8.0327350124157736091398445228866286178099792434415172399254921152569101E-17 -#define TAYLOR_ERF_18 4.2214072888070882330314498243398198441944335363431396906515348954052831E-18 -#define TAYLOR_ERF_19 -2.1078551914421358248605080094544309613386510235451574703658136454790212E-19 -#define TAYLOR_ERF_20 1.0025164934907719167019489313258878962464315843690383090764235630936808E-20 -#define TAYLOR_ERF_21 -4.5518467589282002862436219473268442686715055325725991884976042178118399E-22 -#define TAYLOR_ERF_22 1.9770647538779051748330883205561040762916640191981996475292624380394860E-23 -#define TAYLOR_ERF_23 -8.2301492992142213568444934713251326025092396728879726307878639881384709E-25 -#define TAYLOR_ERF_24 3.2892603491757517327524761322472893904586246991984244357740612877764297E-26 -#define TAYLOR_ERF_25 -1.2641078988989163521950692586675857265291969432213552733563059066748632E-27 -#define TAYLOR_ERF_26 4.6784835155184857737263085770716162592880293254201102279514950101899871E-29 -#define TAYLOR_ERF_27 -1.6697617934173720269864939702679842541566703989714871520634965356233624E-30 -#define TAYLOR_ERF_28 5.7541916439821717721965644338808981189609568886862025916975131240153466E-32 -#define TAYLOR_ERF_29 -1.9169428621097825307726719621929350834644917747230482041306735714136456E-33 -#define TAYLOR_ERF_30 6.1803075882227961374638057797477142035193997108557291827163792739565622E-35 -#define TAYLOR_ERF_31 -1.9303572088151078565555153741147494440075954038003045578376811864380455E-36 -#define TAYLOR_ERF_32 5.8467550074688362962979552196744814890614668480489993819122074396921572E-38 -#define TAYLOR_ERF_33 -1.7188560628017836239681912676564509126594090688520350964463748691994130E-39 -#define TAYLOR_ERF_34 4.9089239645234229670020807729318930583197104694410209489303971115243253E-41 -#define TAYLOR_ERF_35 -1.3630412617791395763506783635102640685072837923196396196225247512884444E-42 -#define TAYLOR_ERF_36 3.6824935154611457351939940566677606112639706717920248475342183158858278E-44 -#define TAYLOR_ERF_37 -9.6872802388707617538436600409638387251268417672366779772972229571050606E-46 -#define TAYLOR_ERF_38 2.4830690974549115910398991902675594818336060579041382375163763560590552E-47 -#define TAYLOR_ERF_39 -6.2056579196373967059419746072899084745598074150801247740591035188752759E-49 -#define TAYLOR_ERF_40 1.5131079495412170980537530678268603996611876104670674603415715370097123E-50 -#define TAYLOR_ERF_41 -3.6015793098101259166133998969725445892611283117200253978156713046660799E-52 -#define TAYLOR_ERF_42 8.3734196838722815428266720293759440030440798283686864991232694198118944E-54 -#define TAYLOR_ERF_43 -1.9025412272898795272394202686366085010926137006451172211319911806576077E-55 -#define TAYLOR_ERF_44 4.2267897541935525758383443148974703675959497435169866761614717241371774E-57 -#define TAYLOR_ERF_45 -9.1864295023986856959612367283485924961181813717463202485560679718732304E-59 - - /* - * Taylor Series Expansion of Erf - * - * infinite - * --------- - * - n 2n - * 2 * x - -1 * x - * erf(x) = ---- * - ------------ - * sqrt(pi) - (2n + 1) * n! - * - - * --------- - * n = 0 - * - * 45 terms give us accurate results for 0 <= x < 2.5 - */ -#define TAYLOR_ERF(_xabs, _xsqu, _tresult) { \ - _tresult = spu_madd(_xsqu, spu_splats(TAYLOR_ERF_45), spu_splats(TAYLOR_ERF_44)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_43)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_42)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_41)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_40)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_39)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_38)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_37)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_36)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_35)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_34)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_33)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_32)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_31)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_30)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_29)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_28)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_27)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_26)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_25)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_24)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_23)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_22)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_21)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_20)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_19)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_18)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_17)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_16)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_15)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_14)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_13)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_12)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_11)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_10)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_09)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_08)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_07)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_06)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_05)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_04)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_03)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_02)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_01)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats(TAYLOR_ERF_00)); \ - _tresult = spu_mul(_tresult, _xabs); \ - _tresult = spu_mul(_tresult, spu_splats(TWO_OVER_SQRT_PI)); \ -} - -#define TAYLOR_ERFF4(_xabs, _xsqu, _tresult) { \ - _tresult = spu_madd(_xsqu, spu_splats((float)TAYLOR_ERF_45), spu_splats((float)TAYLOR_ERF_44)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_43)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_42)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_41)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_40)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_39)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_38)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_37)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_36)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_35)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_34)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_33)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_32)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_31)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_30)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_29)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_28)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_27)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_26)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_25)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_24)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_23)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_22)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_21)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_20)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_19)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_18)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_17)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_16)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_15)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_14)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_13)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_12)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_11)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_10)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_09)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_08)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_07)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_06)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_05)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_04)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_03)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_02)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_01)); \ - _tresult = spu_madd(_tresult, _xsqu, spu_splats((float)TAYLOR_ERF_00)); \ - _tresult = spu_mul(_tresult, _xabs); \ - _tresult = spu_mul(_tresult, spu_splats((float)TWO_OVER_SQRT_PI)); \ -} - - - - /* - * Continued Fractions Approximation of Erfc() - * ( ) - * 1 ( 1 v 2v 3v ) - * erfc(x) = ------------------------- * ( --- --- --- --- ... ) - * sqrt(pi) * x * exp(x^2) ( 1+ 1+ 1+ 1+ ) - * ( ) - * Continued Fractions - * 1 - * v = ----- - * 2*x^2 - * - * We are using a backward recurrence calculation to estimate the continued fraction. - * - * p = a p + b q - * m,n m m+1,n m m+1,n - * - * q = p - * m,n m+1,n - * - * With, - * - * p = a ; q = 1 - * n,n n n,n - * - * - * a = 0, b = 1, - * 0 0 - * - * a = 1, b = n/2x^2 - * n n - * - * - * F = p / q - * 0,n 0,n 0,n - * - * Ref: "Computing the Incomplete Gamma Function to Arbitrary Precision", - * by Serge Winitzki, Department of Physics, Ludwig-Maximilians University, Munich, Germany. - * - */ - -#define CONTFRAC_ERFCF4(_xabs, _xsqu, _presult) { \ - vec_float4 v; \ - vec_float4 p, q, plast, qlast; \ - vec_float4 factor; \ - vec_float4 inv_xsqu; \ - inv_xsqu = _recipf4(_xsqu); \ - v = spu_mul(inv_xsqu, onehalff); \ - p = spu_splats(3.025f); q = onef; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(40.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(39.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(38.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(37.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(36.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(35.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(34.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(33.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(32.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(31.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(30.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(29.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(28.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(27.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(26.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(25.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(24.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(23.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(22.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(21.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(20.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(19.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(18.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(17.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(16.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(15.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(14.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(13.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(12.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(11.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(10.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats( 9.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats( 8.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats( 7.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats( 6.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats( 5.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats( 4.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats( 3.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats( 2.0f)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats( 1.0f)), plast); q = plast; plast = p; qlast = q; \ - p = qlast; q = plast; \ - factor = spu_mul(spu_splats((float)SQRT_PI), spu_mul(_xabs, _expf4(_xsqu))); \ - _presult = _divf4(p, spu_mul(factor, q)); \ -} - -#define CONTFRAC_ERFC(_xabs, _xsqu, _presult) { \ - vec_double2 v; \ - vec_double2 p, q, plast, qlast; \ - vec_double2 factor; \ - vec_double2 inv_xsqu; \ - inv_xsqu = _recipd2(_xsqu); \ - v = spu_mul(inv_xsqu, onehalfd); \ - p = spu_splats(3.025); q = oned; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(40.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(39.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(38.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(37.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(36.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(35.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(34.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(33.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(32.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(31.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(30.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(29.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(28.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(27.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(26.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(25.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(24.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(23.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(22.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(21.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(20.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(19.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(18.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(17.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(16.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(15.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(14.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(13.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(12.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(11.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats(10.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats( 9.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats( 8.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats( 7.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats( 6.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats( 5.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats( 4.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats( 3.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats( 2.0)), plast); q = plast; plast = p; qlast = q; \ - p = spu_madd(qlast, spu_mul(v, spu_splats( 1.0)), plast); q = plast; plast = p; qlast = q; \ - p = qlast; q = plast; \ - factor = spu_mul(spu_splats(SQRT_PI), spu_mul(_xabs, _expd2(_xsqu))); \ - _presult = _divd2(p, spu_mul(factor, q)); \ -} - -#endif /* _ERF_UTILS_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/erfc.h b/newlib/libm/machine/spu/headers/erfc.h deleted file mode 100644 index 542c4bbc2..000000000 --- a/newlib/libm/machine/spu/headers/erfc.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/erfcd2.h" - -static __inline double _erfc(double x) -{ - return spu_extract(_erfcd2(spu_promote(x, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/erfcd2.h b/newlib/libm/machine/spu/headers/erfcd2.h deleted file mode 100644 index c31acd5b2..000000000 --- a/newlib/libm/machine/spu/headers/erfcd2.h +++ /dev/null @@ -1,150 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _ERFCD2_H_ -#define _ERFCD2_H_ 1 - -#include - -#include "expd2.h" -#include "recipd2.h" -#include "divd2.h" -#include "erf_utils.h" - -/* - * FUNCTION - * vector double _erfcd2(vector double x) - * - * DESCRIPTION - * The erfcd2 function computes the complement error function of each element of x. - * - * Accuracy Note: We would benefit from a rational approximation in the domain - * 1.2 < x < 2.0 and also around x = 2.5. - * - * C99 Special Cases: - * - erfc(+0) returns +1 - * - erfc(-0) returns +1 - * - erfc(+infinite) returns +0 - * - erfc(-infinite) returns +2 - * - * Other Cases: - * - erfc(Nan) returns Nan - * - */ - -static __inline vector double _erfcd2(vector double x) -{ - vec_uchar16 dup_even = ((vec_uchar16) { 0,1,2,3, 0,1,2,3, 8,9,10,11, 8,9,10,11 }); - vec_double2 onehalfd = spu_splats(0.5); - vec_double2 zerod = spu_splats(0.0); - vec_double2 oned = spu_splats(1.0); - vec_double2 twod = spu_splats(2.0); - vec_double2 sign_mask = spu_splats(-0.0); - - /* This is where we switch from near zero approx. */ - vec_float4 approx_point = spu_splats(1.71f); - - vec_double2 xabs, xsqu, xsign; - vec_uint4 xhigh, xabshigh; - vec_uint4 isnan, isneg; - vec_double2 tresult, presult, result; - - xsign = spu_and(x, sign_mask); - - /* Force Denorms to 0 */ - x = spu_add(x, zerod); - - xabs = spu_andc(x, sign_mask); - xsqu = spu_mul(x, x); - - /* - * Use Taylor Series for x near 0 - * Preserve sign of x in result, since erf(-x) = -erf(x) - * This approximation is for erf, so adjust for erfc. - */ - TAYLOR_ERF(xabs, xsqu, tresult); - tresult = spu_or(tresult, xsign); - tresult = spu_sub(oned, tresult); - - /* - * Now, use the Continued Fractions approximation away - * from 0. If x < 0, use erfc(-x) = 2 - erfc(x) - */ - CONTFRAC_ERFC(xabs, xsqu, presult); - isneg = (vec_uint4)spu_shuffle(x, x, dup_even); - isneg = spu_rlmaska(isneg, -32); - presult = spu_sel(presult, spu_sub(twod, presult), (vec_ullong2)isneg); - - /* - * Select the appropriate approximation. - */ - vec_float4 xf = spu_roundtf(xabs); - xf = spu_shuffle(xf, xf, dup_even); - result = spu_sel(tresult, presult, (vec_ullong2)spu_cmpgt(xf, approx_point)); - - /* - * Special cases/errors. - */ - xhigh = (vec_uint4)spu_shuffle(x, x, dup_even); - xabshigh = (vec_uint4)spu_shuffle(xabs, xabs, dup_even); - - /* x = +/- infinite */ - result = spu_sel(result, zerod, (vec_ullong2)spu_cmpeq(xhigh, 0x7FF00000)); - result = spu_sel(result, twod, (vec_ullong2)spu_cmpeq(xhigh, 0xFFF00000)); - - /* x = nan, return x */ - isnan = spu_cmpgt(xabshigh, 0x7FF00000); - result = spu_sel(result, x, (vec_ullong2)isnan); - - return result; -} - -#endif /* _ERFCD2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/erfcf.h b/newlib/libm/machine/spu/headers/erfcf.h deleted file mode 100644 index f2c589cc1..000000000 --- a/newlib/libm/machine/spu/headers/erfcf.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/erfcf4.h" - -static __inline float _erfcf(float x) -{ - return spu_extract(_erfcf4(spu_promote(x, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/erfcf4.h b/newlib/libm/machine/spu/headers/erfcf4.h deleted file mode 100644 index 2f4774424..000000000 --- a/newlib/libm/machine/spu/headers/erfcf4.h +++ /dev/null @@ -1,133 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _ERFCF4_H_ -#define _ERFCF4_H_ 1 - -#include - -#include "expf4.h" -#include "recipf4.h" -#include "divf4.h" -#include "erf_utils.h" - -/* - * FUNCTION - * vector float _erfcf4(vector float x) - * - * DESCRIPTION - * The erfcf4 function computes the complement error function of each element of x. - * - * C99 Special Cases: - * - erfc(+0) returns +1 - * - erfc(-0) returns +1 - * - erfc(+infinite) returns +0 - * - erfc(-infinite) returns +2 - * - */ - -static __inline vector float _erfcf4(vector float x) -{ - vec_float4 onehalff = spu_splats(0.5f); - vec_float4 zerof = spu_splats(0.0f); - vec_float4 onef = spu_splats(1.0f); - vec_float4 twof = spu_splats(2.0f); - vec_float4 sign_mask = spu_splats(-0.0f); - - /* This is where we switch from near zero approx. */ - vec_float4 approx_point = spu_splats(0.89f); - - vec_float4 xabs, xsqu, xsign; - vec_uint4 isneg; - vec_float4 tresult, presult, result; - - xsign = spu_and(x, sign_mask); - - /* Force Denorms to 0 */ - x = spu_add(x, zerof); - - xabs = spu_andc(x, sign_mask); - xsqu = spu_mul(x, x); - - /* - * Use Taylor Series for x near 0 - * Preserve sign of x in result, since erf(-x) = -erf(x) - * This approximation is for erf, so adjust for erfc. - */ - TAYLOR_ERFF4(xabs, xsqu, tresult); - tresult = spu_or(tresult, xsign); - tresult = spu_sub(onef, tresult); - - /* - * Now, use the Continued Fractions approximation away - * from 0. If x < 0, use erfc(-x) = 2 - erfc(x) - */ - CONTFRAC_ERFCF4(xabs, xsqu, presult); - isneg = spu_rlmaska((vec_uint4)x, -32); - presult = spu_sel(presult, spu_sub(twof, presult), isneg); - - /* - * Select the appropriate approximation. - */ - result = spu_sel(tresult, presult, spu_cmpgt(xabs, approx_point)); - - /* - * Special cases/errors. - */ - - /* x = +/- infinite */ - result = spu_sel(result, zerof, spu_cmpeq((vec_uint4)xabs, 0x7F800000)); - result = spu_sel(result, twof, spu_cmpeq((vec_uint4)xabs, 0xFF800000)); - - return result; -} - -#endif /* _ERFCF4_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/erfd2.h b/newlib/libm/machine/spu/headers/erfd2.h deleted file mode 100644 index 2ee71feaf..000000000 --- a/newlib/libm/machine/spu/headers/erfd2.h +++ /dev/null @@ -1,146 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _ERFD2_H_ -#define _ERFD2_H_ 1 - -#include - -#include "expd2.h" -#include "recipd2.h" -#include "divd2.h" -#include "erf_utils.h" - -/* - * FUNCTION - * vector double _erfd2(vector double x) - * - * DESCRIPTION - * The erfd2 function computes the error function of each element of x. - * - * C99 Special Cases: - * - erf(+0) returns +0 - * - erf(-0) returns -0 - * - erf(+infinite) returns +1 - * - erf(-infinite) returns -1 - * - * Other Cases: - * - erf(Nan) returns Nan - * - */ - -static __inline vector double _erfd2(vector double x) -{ - vec_uchar16 dup_even = ((vec_uchar16) { 0,1,2,3, 0,1,2,3, 8, 9,10,11, 8, 9,10,11 }); - vec_double2 onehalfd = spu_splats(0.5); - vec_double2 zerod = spu_splats(0.0); - vec_double2 oned = spu_splats(1.0); - vec_double2 sign_mask = spu_splats(-0.0); - - /* This is where we switch from Taylor Series to Continued Fraction approximation */ - vec_float4 approx_point = spu_splats(1.77f); - - vec_double2 xabs, xsqu, xsign; - vec_uint4 xabshigh; - vec_uint4 isinf, isnan; - vec_double2 tresult, presult, result; - - xsign = spu_and(x, sign_mask); - - /* Force Denorms to 0 */ - x = spu_add(x, zerod); - - xabs = spu_andc(x, sign_mask); - xsqu = spu_mul(x, x); - - /* - * Taylor Series Expansion near Zero - */ - TAYLOR_ERF(xabs, xsqu, tresult); - - /* - * Continued Fraction Approximation of Erfc(). - * erf = 1 - erfc - */ - CONTFRAC_ERFC(xabs, xsqu, presult); - presult = spu_sub(oned, presult); - - - /* - * Select the appropriate approximation. - */ - vec_float4 xf = spu_roundtf(xabs); - xf = spu_shuffle(xf, xf, dup_even); - result = spu_sel(tresult, presult, (vec_ullong2)spu_cmpgt(xf, approx_point)); - - - /* - * Special cases/errors. - */ - xabshigh = (vec_uint4)spu_shuffle(xabs, xabs, dup_even); - - /* x = +/- infinite, return +/-1 */ - isinf = spu_cmpeq(xabshigh, 0x7FF00000); - result = spu_sel(result, oned, (vec_ullong2)isinf); - - /* x = nan, return x */ - isnan = spu_cmpgt(xabshigh, 0x7FF00000); - result = spu_sel(result, x, (vec_ullong2)isnan); - - /* - * Preserve sign in result, since erf(-x) = -erf(x) - */ - result = spu_or(result, xsign); - - return result; -} - -#endif /* _ERFD2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/erff.h b/newlib/libm/machine/spu/headers/erff.h deleted file mode 100644 index c355f8177..000000000 --- a/newlib/libm/machine/spu/headers/erff.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/erff4.h" - -static __inline float _erff(float x) -{ - return spu_extract(_erff4(spu_promote(x, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/erff4.h b/newlib/libm/machine/spu/headers/erff4.h deleted file mode 100644 index eafd9be12..000000000 --- a/newlib/libm/machine/spu/headers/erff4.h +++ /dev/null @@ -1,132 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _ERFF4_H_ -#define _ERFF4_H_ 1 - -#include - -#include "expf4.h" -#include "recipf4.h" -#include "divf4.h" -#include "erf_utils.h" - -/* - * FUNCTION - * vector float _erff4(vector float x) - * - * DESCRIPTION - * The erff4 function computes the error function of each element of x. - * - * C99 Special Cases: - * - erf(+0) returns +0 - * - erf(-0) returns -0 - * - erf(+infinite) returns +1 - * - erf(-infinite) returns -1 - * - */ - -static __inline vector float _erff4(vector float x) -{ - vector float onehalff = spu_splats(0.5f); - vector float zerof = spu_splats(0.0f); - vector float onef = spu_splats(1.0f); - vector float sign_mask = spu_splats(-0.0f); - - /* This is where we switch from Taylor Series to Continued Fraction approximation */ - vec_float4 approx_point = spu_splats(0.89f); - - vec_float4 xabs, xsqu, xsign; - vec_uint4 isinf; - vec_float4 tresult, presult, result; - - xsign = spu_and(x, sign_mask); - - /* Force Denorms to 0 */ - x = spu_add(x, zerof); - - xabs = spu_andc(x, sign_mask); - xsqu = spu_mul(x, x); - - /* - * Taylor Series Expansion near Zero - */ - TAYLOR_ERFF4(xabs, xsqu, tresult); - - /* - * Continued Fraction Approximation of Erfc(). - * erf = 1 - erfc - */ - CONTFRAC_ERFCF4(xabs, xsqu, presult); - presult = spu_sub(onef, presult); - - /* - * Select the appropriate approximation. - */ - result = spu_sel(tresult, presult, spu_cmpgt(xabs, approx_point)); - - /* - * Special cases/errors. - */ - - /* x = +/- infinite, return +/-1 */ - isinf = spu_cmpeq((vec_uint4)xabs, 0x7F800000); - result = spu_sel(result, onef, isinf); - - /* - * Preserve sign in result, since erf(-x) = -erf(x) - */ - result = spu_or(result, xsign); - - return result; -} - -#endif /* _ERFF4_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/exp.h b/newlib/libm/machine/spu/headers/exp.h deleted file mode 100644 index 164034138..000000000 --- a/newlib/libm/machine/spu/headers/exp.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/expd2.h" - -static __inline double _exp(double x) -{ - return spu_extract(_expd2(spu_promote(x, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/exp2.h b/newlib/libm/machine/spu/headers/exp2.h deleted file mode 100644 index 3fe22972f..000000000 --- a/newlib/libm/machine/spu/headers/exp2.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/exp2d2.h" - -static __inline double _exp2(double vx) -{ - return spu_extract(_exp2d2(spu_promote(vx, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/exp2d2.h b/newlib/libm/machine/spu/headers/exp2d2.h deleted file mode 100644 index 27b0f31c9..000000000 --- a/newlib/libm/machine/spu/headers/exp2d2.h +++ /dev/null @@ -1,164 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ - -#ifndef _EXP2D2_H_ -#define _EXP2D2_H_ 1 - -#include - - -/* - * FUNCTION - * vector double _exp2d2(vector double x) - * - * DESCRIPTION - * _exp2d2 computes 2 raised to the input x for each - * of the double word elements of x. Computation is - * performed by observing the 2^(a+b) = 2^a * 2^b. - * We decompose x into a and b (above) by letting. - * a = ceil(x), b = x - a; - * - * 2^a is easily computed by placing a into the exponent - * or a floating point number whose mantissa is all zeros. - * - * 2^b is computed using the polynomial approximation. - * - * __13_ - * \ - * \ - * 2^x = / Ci*x^i - * /____ - * i=0 - * - * for x in the range 0.0 to 1.0. - * - */ -#define EXP_C00 1.0 -#define EXP_C01 6.93147180559945286227e-01 -#define EXP_C02 2.40226506959100694072e-01 -#define EXP_C03 5.55041086648215761801e-02 -#define EXP_C04 9.61812910762847687873e-03 -#define EXP_C05 1.33335581464284411157e-03 -#define EXP_C06 1.54035303933816060656e-04 -#define EXP_C07 1.52527338040598376946e-05 -#define EXP_C08 1.32154867901443052734e-06 -#define EXP_C09 1.01780860092396959520e-07 -#define EXP_C10 7.05491162080112087744e-09 -#define EXP_C11 4.44553827187081007394e-10 -#define EXP_C12 2.56784359934881958182e-11 -#define EXP_C13 1.36914888539041240648e-12 - -static __inline vector double _exp2d2(vector double vx) -{ - vec_int4 ix, exp; - vec_uint4 overflow, underflow; - vec_float4 vxf; - vec_double2 p1, p2, x2, x4, x8; - vec_double2 vy, vxw, out_of_range; - - /* Compute: vxw = x - ceil(x) - */ - vxw = spu_add(vx, spu_splats(0.5)); - vxf = spu_roundtf(vxw); - ix = spu_convts(vxf, 0); - ix = spu_add(ix, (vec_int4)spu_andc(spu_cmpgt(spu_splats(0.0f), vxf), spu_cmpeq(ix, spu_splats((int)0x80000000)))); - vxf = spu_convtf(ix, 0); - vxw = spu_sub(vx, spu_extend(vxf)); - - /* Detect overflow and underflow. If overflow, force the result - * to infinity (at the end). - */ - exp = spu_shuffle(ix, ix, ((vec_uchar16) { 0,1,2,3, 0,1,2,3, 8,9,10,11, 8,9,10,11 })); - - overflow = spu_cmpgt(exp, 1023); - underflow = spu_cmpgt(exp, -1023); - out_of_range = (vec_double2)spu_and(overflow, ((vec_uint4) { 0x7FF00000, 0, 0x7FF00000, 0 })); - - /* Calculate the result by evaluating the 13th order polynomial. - * For efficiency, the polynomial is broken into two parts and - * evaluate then using nested - * - * result = (((((c13*x + c12)*x + c11)*x + c10)*x + c9)*x + c8)*x^8 + - * ((((((c7*x + c6)*x + c5)*x + c4)*x + c3)*x + c2)*x + c1)*x + c0 - */ - p2 = spu_madd(spu_splats(EXP_C07), vxw, spu_splats(EXP_C06)); - p1 = spu_madd(spu_splats(EXP_C13), vxw, spu_splats(EXP_C12)); - x2 = spu_mul(vxw, vxw); - p2 = spu_madd(vxw, p2, spu_splats(EXP_C05)); - p1 = spu_madd(vxw, p1, spu_splats(EXP_C11)); - x4 = spu_mul(x2, x2); - p2 = spu_madd(vxw, p2, spu_splats(EXP_C04)); - p1 = spu_madd(vxw, p1, spu_splats(EXP_C10)); - p2 = spu_madd(vxw, p2, spu_splats(EXP_C03)); - p1 = spu_madd(vxw, p1, spu_splats(EXP_C09)); - x8 = spu_mul(x4, x4); - p2 = spu_madd(vxw, p2, spu_splats(EXP_C02)); - p1 = spu_madd(vxw, p1, spu_splats(EXP_C08)); - p2 = spu_madd(vxw, p2, spu_splats(EXP_C01)); - p2 = spu_madd(vxw, p2, spu_splats(EXP_C00)); - vy = spu_madd(x8, p1, p2); - - /* Align the integer integer portion of x with the exponent. - */ - ix = spu_sl(ix, ((vec_uint4) { 20, 32, 20, 32 })); - vy = (vec_double2)spu_add((vec_int4)vy, ix); - - /* Select the result if not overflow or underflow. Otherwise select the - * the out of range value. - */ - return (spu_sel(vy, out_of_range, (vec_ullong2)spu_orc(overflow, underflow))); -} - -#endif /* _EXP2D2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/exp2f.h b/newlib/libm/machine/spu/headers/exp2f.h deleted file mode 100644 index 84bccdc04..000000000 --- a/newlib/libm/machine/spu/headers/exp2f.h +++ /dev/null @@ -1,124 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _EXP2F_H_ -#define _EXP2F_H_ 1 - -#ifndef M_LN2 -#define M_LN2 0.69314718055994530942 /* ln(2) */ -#endif /* M_LN2 */ - -/* - * FUNCTION - * float _exp2f(float x) - * - * DESCRIPTION - * _exp2f computes 2 raised to the input x. Computation is - * performed by observing the 2^(a+b) = 2^a * 2^b. - * We decompose x into a and b (above) by letting. - * a = ceil(x), b = x - a; - * - * 2^a is easilty computed by placing a into the exponent - * or a floating point number whose mantissa is all zeros. - * - * 2^b is computed using the following polynomial approximation. - * (C. Hastings, Jr, 1955). - * - * __7__ - * \ - * \ - * 2^x = / Ci*x^i - * /____ - * i=0 - * - * for x in the range 0.0 to 1.0 - * - * C0 = 1.0 - * C1 = -0.9999999995 - * C2 = 0.4999999206 - * C3 = -0.1666653019 - * C4 = 0.0416573475 - * C5 = -0.0083013598 - * C6 = 0.0013298820 - * C7 = -0.0001413161 - * - */ -static __inline float _exp2f(float x) -{ - union { - float f; - unsigned int ui; - } bias, exp_int, exp_frac; - unsigned int overflow, underflow; - int ix; - float frac, frac2, frac4; - float hi, lo; - - /* Break in the input x into two parts ceil(x), x - ceil(x). - */ - bias.f = x; - bias.ui = ~(unsigned int)((signed)(bias.ui) >> 31) & 0x3F7FFFFF; - ix = (int)(x + bias.f); - frac = (float)ix - x; - frac *= (float)(M_LN2); - - exp_int.ui = (ix + 127) << 23; - - overflow = (ix > 128) ? 0x7FFFFFFF : 0x0; - underflow = (ix < -127) ? 0xFFFFFFFF : 0x0; - - /* Instruction counts can be reduced if the polynomial was - * computed entirely from nested (dependent) fma's. However, - * to reduce the number of pipeline stalls, the polygon is evaluated - * in two halves (hi amd lo). - */ - frac2 = frac * frac; - frac4 = frac2 * frac2; - hi = -0.0001413161f * frac + 0.0013298820f; - hi = hi * frac - 0.0083013598f; - hi = hi * frac + 0.0416573475f; - lo = -0.1666653019f * frac + 0.4999999206f; - lo = lo * frac - 0.9999999995f; - lo = lo * frac + 1.0f; - exp_frac.f = hi * frac4 + lo; - - ix += exp_frac.ui >> 23; - exp_frac.f *= exp_int.f; - - exp_frac.ui = (exp_frac.ui | overflow) & ~underflow; - - return (exp_frac.f); -} - -#endif /* _EXP2F_H_ */ - - diff --git a/newlib/libm/machine/spu/headers/exp2f4.h b/newlib/libm/machine/spu/headers/exp2f4.h deleted file mode 100644 index 71cc3fea7..000000000 --- a/newlib/libm/machine/spu/headers/exp2f4.h +++ /dev/null @@ -1,146 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _EXP2F4_H_ -#define _EXP2F4_H_ 1 - - -#include -#include "simdmath.h" - -/* - * FUNCTION - * vector float _exp2f4(vector float x) - * - * DESCRIPTION - * The _exp2f4 function computes 2 raised to the input vector x. - * Computation is performed by observing the 2^(a+b) = 2^a * 2^b. - * We decompose x into a and b (above) by letting. - * a = ceil(x), b = x - a; - * - * 2^a is easilty computed by placing a into the exponent - * or a floating point number whose mantissa is all zeros. - * - * 2^b is computed using the following polynomial approximation. - * (C. Hastings, Jr, 1955). - * - * __7__ - * \ - * \ - * 2^(-x) = / Ci*x^i - * /____ - * i=1 - * - * for x in the range 0.0 to 1.0 - * - * C0 = 1.0 - * C1 = -0.9999999995 - * C2 = 0.4999999206 - * C3 = -0.1666653019 - * C4 = 0.0416573475 - * C5 = -0.0083013598 - * C6 = 0.0013298820 - * C7 = -0.0001413161 - * - */ -static __inline vector float _exp2f4(vector float x) -{ - vector signed int ix; - vector unsigned int overflow, underflow; - vector float frac, frac2, frac4; - vector float exp_int, exp_frac; - vector float result; - vector float hi, lo; - - vector float bias; - /* Break in the input x into two parts ceil(x), x - ceil(x). - */ - bias = (vector float)(spu_rlmaska((vector signed int)(x), -31)); - bias = (vector float)(spu_andc(spu_splats((unsigned int)0x3F7FFFFF), (vector unsigned int)bias)); - ix = spu_convts(spu_add(x, bias), 0); - frac = spu_sub(spu_convtf(ix, 0), x); - frac = spu_mul(frac, spu_splats((float)SM_LN2)); - - overflow = spu_rlmask(spu_cmpgt(ix, 128), -1); - underflow = spu_cmpgt(ix, -128); - - exp_int = (vector float)spu_and((vector unsigned int)spu_sl(spu_add(ix, 127), 23), underflow); - - /* Instruction counts can be reduced if the polynomial was - * computed entirely from nested (dependent) fma's. However, - * to reduce the number of pipeline stalls, the polygon is evaluated - * in two halves (hi amd lo). - */ - frac2 = spu_mul(frac, frac); - frac4 = spu_mul(frac2, frac2); - - hi = spu_madd(frac, spu_splats(-0.0001413161f), spu_splats(0.0013298820f)); - hi = spu_madd(frac, hi, spu_splats(-0.0083013598f)); - hi = spu_madd(frac, hi, spu_splats(0.0416573475f)); - lo = spu_madd(frac, spu_splats(-0.1666653019f), spu_splats(0.4999999206f)); - lo = spu_madd(frac, lo, spu_splats(-0.9999999995f)); - lo = spu_madd(frac, lo, spu_splats(1.0f)); - - exp_frac = spu_madd(frac4, hi, lo); - ix = spu_add(ix, spu_rlmask((vector signed int)(exp_frac), -23)); - result = spu_mul(exp_frac, exp_int); - - /* Handle overflow */ - result = spu_or(result, (vector float)overflow); - - return (result); - -} - -#endif /* _EXP2F4_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/expd2.h b/newlib/libm/machine/spu/headers/expd2.h deleted file mode 100644 index 19d77dd51..000000000 --- a/newlib/libm/machine/spu/headers/expd2.h +++ /dev/null @@ -1,165 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _EXPD2_H_ -#define _EXPD2_H_ 1 - -#include -#include "floord2.h" -#include "ldexpd2.h" - -#define LOG2E 1.4426950408889634073599 // 1/log(2) - -/* - * FUNCTION - * vector double _expd2(vector double x) - * - * DESCRIPTION - * _expd2 computes e raised to the input x for - * each of the element of the double word vector. - * - * Calculation is performed by reducing the input argument - * to within a managable range, and then computing the power - * series to the 11th degree. - * - * Range reduction is performed using the property: - * - * exp(x) = 2^n * exp(r) - * - * Values for "n" and "r" are determined such that: - * - * x = n * ln(2) + r, |r| <= ln(2)/2 - * - * n = floor( (x/ln(2)) + 1/2 ) - * r = x - (n * ln(2)) - * - * To enhance the precision for "r", computation is performed - * using a two part representation of ln(2). - * - * Once the input is reduced, the power series is computed: - * - * __12_ - * \ - * exp(x) = 1 + \ (x^i)/i! - * / - * /____ - * i=2 - * - * The resulting value is scaled by 2^n and returned. - * - */ - -static __inline vector double _expd2(vector double x) -{ - vec_uchar16 even2odd = ((vec_uchar16){0x80, 0x80, 0x80, 0x80, 0, 1, 2, 3, - 0x80, 0x80, 0x80, 0x80, 8, 9, 10, 11}); - - // log(2) in extended machine representable precision - vec_double2 ln2_hi = spu_splats(6.9314575195312500E-1); // 3FE62E4000000000 - vec_double2 ln2_lo = spu_splats(1.4286068203094172E-6); // 3EB7F7D1CF79ABCA - - - // coefficients for the power series - vec_double2 f02 = spu_splats(5.00000000000000000000E-1); // 1/(2!) - vec_double2 f03 = spu_splats(1.66666666666666666667E-1); // 1/(3!) - vec_double2 f04 = spu_splats(4.16666666666666666667E-2); // 1/(4!) - vec_double2 f05 = spu_splats(8.33333333333333333333E-3); // 1/(5!) - vec_double2 f06 = spu_splats(1.38888888888888888889E-3); // 1/(6!) - vec_double2 f07 = spu_splats(1.98412698412698412698E-4); // 1/(7!) - vec_double2 f08 = spu_splats(2.48015873015873015873E-5); // 1/(8!) - vec_double2 f09 = spu_splats(2.75573192239858906526E-6); // 1/(9!) - vec_double2 f10 = spu_splats(2.75573192239858906526E-7); // 1/(10!) - vec_double2 f11 = spu_splats(2.50521083854417187751E-8); // 1/(11!) - vec_double2 f12 = spu_splats(2.08767569878680989792E-9); // 1/(12!) - - // rx = floor(1/2 + x/log(2)) - vec_double2 rx = _floord2(spu_madd(x,spu_splats(LOG2E),spu_splats(0.5))); - - // extract the exponent of reduction - vec_int4 nint = spu_convts(spu_roundtf(rx),0); - vec_llong2 n = spu_extend(spu_shuffle(nint, nint, even2odd)); - - // reduce the input to within [ -ln(2)/2 ... ln(2)/2 ] - vec_double2 r; - r = spu_nmsub(rx,ln2_hi,x); - r = spu_nmsub(rx,ln2_lo,r); - - - vec_double2 result; - vec_double2 r2 = spu_mul(r,r); - - // Use Horner's method on the power series - result = spu_madd(r,f12,f11); - result = spu_madd(result,r,f10); - result = spu_madd(result,r,f09); - result = spu_madd(result,r,f08); - result = spu_madd(result,r,f07); - result = spu_madd(result,r,f06); - result = spu_madd(result,r,f05); - result = spu_madd(result,r,f04); - result = spu_madd(result,r,f03); - result = spu_madd(result,r,f02); - result = spu_madd(result,r2,r); - result = spu_add(result,spu_splats(1.0)); - - // Scale the result - result = _ldexpd2(result, n); - - return result; - - -} - - -#endif /* _EXPD2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/expf.h b/newlib/libm/machine/spu/headers/expf.h deleted file mode 100644 index dd3c8c6c1..000000000 --- a/newlib/libm/machine/spu/headers/expf.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _EXPF_H_ -#define _EXPF_H_ 1 - -#include "exp2f.h" - -#ifndef M_LOG2E -#define M_LOG2E 1.4426950408889634074 -#endif /* M_LOG2E */ - -/* - * FUNCTION - * float _expf(float x) - * - * DESCRIPTION - * _expf computes e raised to the input x. expf is - * computed using exp2f as e^x = 2^(log2(e)*x) - */ - -static __inline float _expf(float x) -{ - return (_exp2f((float)(M_LOG2E) * x)); -} - -#endif /* _EXPF_H_ */ - - diff --git a/newlib/libm/machine/spu/headers/expf4.h b/newlib/libm/machine/spu/headers/expf4.h deleted file mode 100644 index e8c68c163..000000000 --- a/newlib/libm/machine/spu/headers/expf4.h +++ /dev/null @@ -1,124 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _EXPF4_H_ -#define _EXPF4_H_ 1 - - -#include "floorf4.h" -#include "ldexpf4.h" - -/* - * FUNCTION - * vector float _expf4(vector float x) - * - * DESCRIPTION - * The _expf4 function computes e raised to the input x for - * each of the element of the float vector. - * - */ -static __inline vector float _expf4(vector float x) -{ - - // log2(e) - vec_float4 log2e = spu_splats(1.4426950408889634074f); - - // Extra precision for the ln2 multiply - vec_float4 ln2_hi = spu_splats(0.693359375f); - vec_float4 ln2_lo = spu_splats(-2.12194440E-4f); - - // Coefficents for the Taylor series - vec_float4 f02 = spu_splats(5.0000000000000000E-1f); // 1/2! - vec_float4 f03 = spu_splats(1.6666666666666667E-1f); // 1/3! - vec_float4 f04 = spu_splats(4.1666666666666667E-2f); // 1/4! - vec_float4 f05 = spu_splats(8.3333333333333333E-3f); // 1/5! - vec_float4 f06 = spu_splats(1.3888888888888889E-3f); // 1/6! - vec_float4 f07 = spu_splats(1.9841269841269841E-4f); // 1/7! - - // Range reduce input, so that: - // e^x = e^z * 2^n - // e^x = e^z * e^(n * ln(2)) - // e^x = e^(z + (n * ln(2))) - - vec_int4 n; // exponent of reduction - vec_float4 q; // range reduced result - - vec_float4 z; - vec_float4 r; - - z = spu_madd(x,log2e,spu_splats(0.5f)); - z = _floorf4(z); - r = spu_nmsub(z,ln2_hi,x); - r = spu_nmsub(z,ln2_lo,r); - n = spu_convts(z,0); - z = spu_mul(r,r); - - // Use Horner's method on the Taylor series - q = spu_madd(r,f07,f06); - q = spu_madd(q,r,f05); - q = spu_madd(q,r,f04); - q = spu_madd(q,r,f03); - q = spu_madd(q,r,f02); - q = spu_madd(q,z,r); - q = spu_add(q,spu_splats(1.0f)); - - // Adjust the result by the range reduction - r = _ldexpf4( q, n ); - - return(r); - -} - -#endif /* _EXPF4_H_ */ -#endif /* __SPU__ */ - diff --git a/newlib/libm/machine/spu/headers/expm1.h b/newlib/libm/machine/spu/headers/expm1.h deleted file mode 100644 index 4983c1949..000000000 --- a/newlib/libm/machine/spu/headers/expm1.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/expm1d2.h" - -static __inline double _expm1(double x) -{ - return spu_extract(_expm1d2(spu_promote(x, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/expm1d2.h b/newlib/libm/machine/spu/headers/expm1d2.h deleted file mode 100644 index 18149f7e0..000000000 --- a/newlib/libm/machine/spu/headers/expm1d2.h +++ /dev/null @@ -1,147 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ - -#ifndef _EXPM1D2_H_ -#define _EXPM1D2_H_ 1 - -#include - -#include "expd2.h" -#include "divd2.h" - -#define EXPM1_P0 0.0000000000000000000000000e+00 -#define EXPM1_P1 1.0000000000000000000000000e+00 -#define EXPM1_P2 9.7234232565378004697204117e-04 -#define EXPM1_P3 3.3328278237299953368211192e-02 -#define EXPM1_P4 3.1156225044634678993365345e-05 -#define EXPM1_P5 2.1352206553343212164751408e-04 -#define EXPM1_P6 1.6975135794626144795757452e-07 -#define EXPM1_P7 2.7686287801334994383131629e-07 -#define EXPM1_P8 1.1186114936216450015354379e-10 - -#define EXPM1_Q0 1.0000000000000000000000000e+00 -#define EXPM1_Q1 -4.9902765767434620336473472e-01 -#define EXPM1_Q2 1.1617544040780639069687652e-01 -#define EXPM1_Q3 -1.6551954366467523660499950e-02 -#define EXPM1_Q4 1.5864115838972218334307351e-03 -#define EXPM1_Q5 -1.0534540477401370666288988e-04 -#define EXPM1_Q6 4.7650003993592160620959043e-06 -#define EXPM1_Q7 -1.3529198871087017840776265e-07 -#define EXPM1_Q8 1.8635779407675460757658020e-09 - -/* - * FUNCTION - * vector double _expm1d2(vector double x) - * - * DESCRIPTION - * _expm1d2 computes the exponential - 1 for each element - * of the input vector x. - * - * This function is intended to return accurate values, even - * where exp(x) - 1 would normally produce bad results due to - * floating-point cancellation errors. - * - */ - -static __inline vector double _expm1d2(vector double x) -{ - vector double oned = spu_splats(1.0); - vector double range = spu_splats(1.0625); - vector unsigned long long use_exp; - vector double pr, qr; - vector double eresult; - vector double rresult; - vector double result; - - /* Compiler Bug. Replace xbug with x when spu_cmp*() doesn't - * modify it's arguments! */ - volatile vector double xbug = x; - use_exp = spu_cmpabsgt(xbug, range); - - /* - * Calculate directly using exp(x) - 1 - */ - eresult = spu_sub(_expd2(x), oned); - - /* - * For x in [-1.0625,1.0625], use a rational approximation. - * The madd's are interleaved to reduce dependency stalls. Looks - * like gcc is smart enough to do this on it's own... but why - * take the chance. - */ - pr = spu_madd(x, spu_splats(EXPM1_P8), spu_splats(EXPM1_P7)); - qr = spu_madd(x, spu_splats(EXPM1_Q8), spu_splats(EXPM1_Q7)); - pr = spu_madd(pr, x, spu_splats(EXPM1_P6)); - qr = spu_madd(qr, x, spu_splats(EXPM1_Q6)); - pr = spu_madd(pr, x, spu_splats(EXPM1_P5)); - qr = spu_madd(qr, x, spu_splats(EXPM1_Q5)); - pr = spu_madd(pr, x, spu_splats(EXPM1_P4)); - qr = spu_madd(qr, x, spu_splats(EXPM1_Q4)); - pr = spu_madd(pr, x, spu_splats(EXPM1_P3)); - qr = spu_madd(qr, x, spu_splats(EXPM1_Q3)); - pr = spu_madd(pr, x, spu_splats(EXPM1_P2)); - qr = spu_madd(qr, x, spu_splats(EXPM1_Q2)); - pr = spu_madd(pr, x, spu_splats(EXPM1_P1)); - qr = spu_madd(qr, x, spu_splats(EXPM1_Q1)); - pr = spu_madd(pr, x, spu_splats(EXPM1_P0)); - qr = spu_madd(qr, x, spu_splats(EXPM1_Q0)); - rresult = _divd2(pr, qr); - - /* - * Select either direct calculation or rational approximation. - */ - result = spu_sel(rresult, eresult, use_exp); - - return result; -} - -#endif /* _EXPM1D2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/expm1f.h b/newlib/libm/machine/spu/headers/expm1f.h deleted file mode 100644 index afc0d9679..000000000 --- a/newlib/libm/machine/spu/headers/expm1f.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/expm1f4.h" - -static __inline float _expm1f(float vx) -{ - return spu_extract(_expm1f4(spu_promote(vx, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/expm1f4.h b/newlib/libm/machine/spu/headers/expm1f4.h deleted file mode 100644 index f7d0a368e..000000000 --- a/newlib/libm/machine/spu/headers/expm1f4.h +++ /dev/null @@ -1,130 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ - -#ifndef _EXPM1F4_H_ -#define _EXPM1F4_H_ 1 - -#include - -#include "expf4.h" -#include "divf4.h" - - -#define EXPM1F4_P0 0.0000000000000000000000000e-00 -#define EXPM1F4_P1 9.9999999999999988897769754e-01 -#define EXPM1F4_P2 -6.5597409827762467697531701e-04 -#define EXPM1F4_P3 2.3800889637330315679042414e-02 -#define EXPM1F4_P4 -1.0914929910143700584950963e-05 - -#define EXPM1F4_Q0 1.0000000000000000000000000e-00 -#define EXPM1F4_Q1 -5.0065597410018825019761834e-01 -#define EXPM1F4_Q2 1.0746220997195164714721471e-01 -#define EXPM1F4_Q3 -1.1966024153043854083566799e-02 -#define EXPM1F4_Q4 5.9997727954467768105711878e-04 - - -/* - * FUNCTION - * vector float _expm1f4(vector float x) - * - * _expm1d2 computes the exponential - 1 for each element - * of the input vector x. - * - * This function is intended to return accurate values, even - * where exp(x) - 1 would normally produce bad results due to - * floating-point cancellation errors. - * - */ - -static __inline vector float _expm1f4(vector float x) -{ - vector float onef = spu_splats(1.0f); - vector float rangelo = spu_splats(-0.4f); - vector float rangehi = spu_splats(0.35f); - vector unsigned int use_exp; - vector float pr, qr; - vector float eresult; - vector float rresult; - vector float result; - - use_exp = spu_or(spu_cmpgt(x, rangehi), spu_cmpgt(rangelo, x)); - - /* - * Calculate directly using exp(x) - 1 - */ - eresult = spu_sub(_expf4(x), onef); - - /* - * For x in [-0.5,0.5], use a rational approximation. - * The madd's are interleaved to reduce dependency stalls. Looks - * like gcc is smart enough to do this on it's own... but why - * take the chance. - */ - pr = spu_madd(x, spu_splats((float)EXPM1F4_P4), spu_splats((float)EXPM1F4_P3)); - qr = spu_madd(x, spu_splats((float)EXPM1F4_Q4), spu_splats((float)EXPM1F4_Q3)); - pr = spu_madd(pr, x, spu_splats((float)EXPM1F4_P2)); - qr = spu_madd(qr, x, spu_splats((float)EXPM1F4_Q2)); - pr = spu_madd(pr, x, spu_splats((float)EXPM1F4_P1)); - qr = spu_madd(qr, x, spu_splats((float)EXPM1F4_Q1)); - pr = spu_madd(pr, x, spu_splats((float)EXPM1F4_P0)); - qr = spu_madd(qr, x, spu_splats((float)EXPM1F4_Q0)); - rresult = _divf4(pr, qr); - - /* - * Select either direct calculation or rational approximation. - */ - result = spu_sel(rresult, eresult, use_exp); - - return result; -} - -#endif /* _EXPM1F4_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/fabs.h b/newlib/libm/machine/spu/headers/fabs.h deleted file mode 100644 index 1b9cfddc2..000000000 --- a/newlib/libm/machine/spu/headers/fabs.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _FABS_H_ -#define _FABS_H_ 1 - -/* - * FUNCTION - * double _fabs(double value) - * - * DESCRIPTION - * The _fabsf routine returns the absolute value of the floating-point - * input value "value". This is accomplished by zeroing the most - * significant bit (ie, the sign bit) of the floating-point value. - */ - -#include -#include "headers/vec_literal.h" - -static __inline double _fabs(double x) -{ - vec_ullong2 vx; - - vx = (vec_ullong2)spu_promote(x, 0); - vx = spu_andc(vx, VEC_SPLAT_U64(0x8000000000000000ULL)); - - return (spu_extract((vec_double2)vx, 0)); -} -#endif /* _FABS_H_ */ diff --git a/newlib/libm/machine/spu/headers/fabsf.h b/newlib/libm/machine/spu/headers/fabsf.h deleted file mode 100644 index f6d0a2e03..000000000 --- a/newlib/libm/machine/spu/headers/fabsf.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _FABSF_H_ -#define _FABSF_H_ 1 - -/* - * FUNCTION - * float _fabsf(float value) - * - * DESCRIPTION - * The _fabsf routine returns the absolute value of the floating-point - * input value "value". This is accomplished by zeroing the most - * significant bit (ie, the sign bit) of the floating-point value. - */ - -static __inline float _fabsf(float value) -{ - union { - unsigned int ui; - float f; - } in; - - in.f = value; - in.ui = (in.ui << 1) >> 1; - - return (in.f); -} -#endif /* _FABSF_H_ */ - - diff --git a/newlib/libm/machine/spu/headers/fdim.h b/newlib/libm/machine/spu/headers/fdim.h deleted file mode 100644 index 8359d880a..000000000 --- a/newlib/libm/machine/spu/headers/fdim.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _FDIM_H_ -#define _FDIM_H_ 1 - -#include -#include "headers/vec_literal.h" - -/* fdim - compute the positive difference of x and y. - */ -static __inline double _fdim(double x, double y) -{ - vec_double2 v; - vec_uint4 mask; - - v = spu_promote(x - y, 0); - mask = (vec_uint4)spu_shuffle(v, v, VEC_SPLAT_U8(0)); - v = spu_andc(v, (vec_double2)spu_rlmaska(mask, -31)); - - return (spu_extract(v, 0)); -} -#endif /* _FDIM_H_ */ diff --git a/newlib/libm/machine/spu/headers/fdimf.h b/newlib/libm/machine/spu/headers/fdimf.h deleted file mode 100644 index 89a98ef4b..000000000 --- a/newlib/libm/machine/spu/headers/fdimf.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _FDIMF_H_ -#define _FDIMF_H_ 1 - -#include - -/* fdim - compute the positive difference of x and y. - */ -static __inline float _fdimf(float x, float y) -{ - vec_float4 vx, vy; - - vx = spu_promote(x, 0); - vy = spu_promote(y, 0); - return (spu_extract(spu_and(spu_sub(vx, vy), - (vec_float4)spu_cmpgt(vx, vy)), 0)); -} -#endif /* _FDIMF_H_ */ diff --git a/newlib/libm/machine/spu/headers/feclearexcept.h b/newlib/libm/machine/spu/headers/feclearexcept.h deleted file mode 100644 index 880367cce..000000000 --- a/newlib/libm/machine/spu/headers/feclearexcept.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _FECLEAREXCEPT_H_ -#define _FECLEAREXCEPT_H_ 1 - -#include -#include -#include "headers/fefpscr.h" - -static __inline void _feclearexcept(int excepts) -{ - vec_uint4 fpscr, fpscr_mask; - - fpscr = spu_mffpscr(); - excepts = ~(excepts & FE_ALL_EXCEPT); - fpscr_mask = __unpack_fpscr((fenv_t) excepts); - fpscr = spu_and(fpscr, fpscr_mask); - spu_mtfpscr(fpscr); -} - -#endif /* _FECLEAREXCEPT_H_ */ diff --git a/newlib/libm/machine/spu/headers/fefpscr.h b/newlib/libm/machine/spu/headers/fefpscr.h deleted file mode 100644 index 316035c7b..000000000 --- a/newlib/libm/machine/spu/headers/fefpscr.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ - -/* - * Functions to pack/unpack the 128 bit fpscr to/from the 32 bit fenv_t. - * The fpscr currently has 32 of 128 bits defined. - */ - -#ifndef _FEFPSCR_H_ -#define _FEFPSCR_H_ 1 - -#include -#include - -static __inline vec_uint4 __unpack_fpscr(fenv_t word) -{ - vec_uint4 fpscr; - vec_uchar16 splat = { 0, 1, 0, 1, 0, 1, 0, 1, 2, 3, 2, 3, 2, 3, 2, 3 }; - vec_short8 rotm = { -12, -9, -3, 0, -10, -7, -3, 0 }; - vec_uint4 mask = { 0x00000f07, 0x00003f07, 0x00003f07, 0x00000f07 }; - - fpscr = spu_promote (word, 0); - fpscr = spu_shuffle (fpscr, fpscr, splat); - /* - * The casts here are important, so we generate different code. - */ - fpscr = (vec_uint4) spu_rlmask ((vec_short8) fpscr, rotm); - fpscr = (vec_uint4) spu_and ((vec_short8) fpscr, 0xff); - fpscr = spu_or (spu_rlmask(fpscr, -8), fpscr); - fpscr = spu_and (fpscr, mask); - return fpscr; -} - -static __inline fenv_t __pack_fpscr(vec_uint4 fpscr) -{ - vec_uchar16 pat = { 0x80, 2, 0x80, 10, 0x80, 3, 0x80, 11, - 0x80, 6, 0x80, 14, 0x80, 7, 0x80, 15 }; - vec_ushort8 shl = { 12, 10, 9, 7, 3, 3, 0, 0 }; - vec_uint4 mask = { 0x00000f07, 0x00003f07, 0x00003f07, 0x00000f07 }; - vec_uint4 word; - - word = spu_and (fpscr, mask); - word = spu_shuffle (word, word, pat); - word = (vec_uint4) spu_sl ((vec_short8) word, shl); - word = spu_orx (word); - return spu_extract (word, 0); -} - -#endif diff --git a/newlib/libm/machine/spu/headers/fegetenv.h b/newlib/libm/machine/spu/headers/fegetenv.h deleted file mode 100644 index 5982eda69..000000000 --- a/newlib/libm/machine/spu/headers/fegetenv.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _FEGETENV_H_ -#define _FEGETENV_H_ 1 - -#include -#include -#include "headers/fefpscr.h" - -static __inline void _fegetenv(fenv_t *envp) -{ - vec_uint4 fpscr; - - fpscr = spu_mffpscr(); - *envp = __pack_fpscr(fpscr); -} - -#endif /* _FEGETENV_H_ */ diff --git a/newlib/libm/machine/spu/headers/fegetexceptflag.h b/newlib/libm/machine/spu/headers/fegetexceptflag.h deleted file mode 100644 index 33e559418..000000000 --- a/newlib/libm/machine/spu/headers/fegetexceptflag.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _FEGETEXCEPTFLAG_H_ -#define _FEGETEXCEPTFLAG_H_ 1 - -#include -#include -#include "headers/fefpscr.h" - -static __inline void _fegetexceptflag(fexcept_t *flagp, int excepts) -{ - vec_uint4 fpscr; - - excepts &= FE_ALL_EXCEPT; - fpscr = spu_mffpscr(); - *flagp = __pack_fpscr(fpscr) & excepts; -} - -#endif /* _FEGETEXCEPTFLAG_H_ */ diff --git a/newlib/libm/machine/spu/headers/fegetround.h b/newlib/libm/machine/spu/headers/fegetround.h deleted file mode 100644 index 7b5a5b5cc..000000000 --- a/newlib/libm/machine/spu/headers/fegetround.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _FEGETROUND_H_ -#define _FEGETROUND_H_ 1 - -#include -#include - -#define FE_MASK_ROUND (__FE_ROUND_ELE_0 | __FE_ROUND_ELE_1) - -static __inline int _fegetround() -{ - return (((spu_extract(spu_mffpscr(), 0) >> 8) & 0xf) | FE_MASK_ROUND); -} - -#endif /* _FEGETROUND_H_ */ diff --git a/newlib/libm/machine/spu/headers/feholdexcept.h b/newlib/libm/machine/spu/headers/feholdexcept.h deleted file mode 100644 index 9f6bd521b..000000000 --- a/newlib/libm/machine/spu/headers/feholdexcept.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _FEHOLDEXCEPT_H_ -#define _FEHOLDEXCEPT_H_ 1 - -#include -#include -#include "headers/fefpscr.h" - -static __inline int _feholdexcept(fenv_t *envp) -{ - vec_uint4 fpscr; - fenv_t env; - - fpscr = spu_mffpscr(); - *envp = __pack_fpscr(fpscr); - env = *envp & ~FE_ALL_EXCEPT; - spu_mtfpscr(__unpack_fpscr(env)); - return (0); -} - -#endif /* _FEHOLDEXCEPT_H_ */ diff --git a/newlib/libm/machine/spu/headers/feraiseexcept.h b/newlib/libm/machine/spu/headers/feraiseexcept.h deleted file mode 100644 index 2e7b24722..000000000 --- a/newlib/libm/machine/spu/headers/feraiseexcept.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _FERAISEEXCEPT_H_ -#define _FERAISEEXCEPT_H_ 1 - -#include -#include -#include "headers/fefpscr.h" - -static __inline void _feraiseexcept(int excepts) -{ - vec_uint4 fpscr, big_except; - - fpscr = spu_mffpscr(); - excepts = excepts & FE_ALL_EXCEPT; - big_except = __unpack_fpscr(excepts); - fpscr = spu_or(fpscr, big_except); - spu_mtfpscr(fpscr); -} - -#endif /* _FERAISEEXCEPT_H_ */ diff --git a/newlib/libm/machine/spu/headers/fesetenv.h b/newlib/libm/machine/spu/headers/fesetenv.h deleted file mode 100644 index 4f8eee305..000000000 --- a/newlib/libm/machine/spu/headers/fesetenv.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _FESETENV_H_ -#define _FESETENV_H_ 1 - -#include -#include -#include "headers/fefpscr.h" - -static __inline void _fesetenv(const fenv_t *envp) -{ - vec_uint4 fpscr; - - fpscr = __unpack_fpscr(*envp); - spu_mtfpscr(fpscr); -} - -#endif /* _FESETENV_H_ */ diff --git a/newlib/libm/machine/spu/headers/fesetexceptflag.h b/newlib/libm/machine/spu/headers/fesetexceptflag.h deleted file mode 100644 index 9a3760840..000000000 --- a/newlib/libm/machine/spu/headers/fesetexceptflag.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _FESETEXCEPTFLAG_H_ -#define _FESETEXCEPTFLAG_H_ 1 - -#include -#include -#include "headers/fefpscr.h" - -static __inline void _fesetexceptflag(const fexcept_t *flagp, int excepts) -{ - vec_uint4 fpscr; - fenv_t mask, pack_fpscr; - - fpscr = spu_mffpscr(); - pack_fpscr = __pack_fpscr(fpscr); - mask = excepts & FE_ALL_EXCEPT; - fpscr = __unpack_fpscr((pack_fpscr & ~mask) | (*flagp & mask)); - spu_mtfpscr(fpscr); -} - -#endif /* _FESETEXCEPTFLAG_H_ */ diff --git a/newlib/libm/machine/spu/headers/fesetround.h b/newlib/libm/machine/spu/headers/fesetround.h deleted file mode 100644 index 3cda4c80d..000000000 --- a/newlib/libm/machine/spu/headers/fesetround.h +++ /dev/null @@ -1,104 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _FESETROUND_H_ -#define _FESETROUND_H_ 1 - -#include -#include - -#define FE_MASK_ROUND (__FE_ROUND_ELE_0 | __FE_ROUND_ELE_1) - -#define SMALL (FE_MASK_ROUND - 1) -#define LARGE (FE_MASK_ROUND + \ - ((__FE_SPU_DOWNWARD << 2) | __FE_SPU_DOWNWARD) + 1) - -static __inline int _fesetround(int mode) -{ - unsigned int umode; - vec_uint4 vec_mode; - vec_uint4 valid, fail; - vec_uint4 cur_fpscr, new_fpscr, mask_fpscr; - vec_uint4 const valid_ele0 = - { FE_TONEAREST, FE_TOWARDZERO, FE_UPWARD, FE_DOWNWARD }; - vec_uint4 const valid_ele1 = - { FE_TONEAREST_1, FE_TOWARDZERO_1, FE_UPWARD_1, FE_DOWNWARD_1 }; - vec_uint4 const too_large = { LARGE, LARGE, LARGE, LARGE }; - vec_uchar16 const splat_ele0 = - { 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3 }; - vec_uint4 const clear_non_ele0 = { 0xffffffff, 0, 0, 0 }; - - /* - * There are 24 valid values, check for a range plus the other 8 - * rather than check for specific bit settings. - * - * These are all the valid values: - * 0xf00 through 0xf0f (SMALL + 1 through LARGE - 1, 16 values) - * 0xc00 0xc04 0xc08 0xc0c (in ele0) - * 0x300 0x301 0x302 0x303 (in ele1) - */ - umode = mode; - vec_mode = spu_splats(umode); - valid = spu_cmpeq(vec_mode, valid_ele0); - valid = spu_or(valid, spu_cmpeq(vec_mode, valid_ele1)); - valid = spu_or(valid, spu_cmpgt(vec_mode, SMALL)); - valid = spu_and(valid, spu_cmpgt(too_large, vec_mode)); - - fail = spu_gather(valid); - fail = spu_cmpeq(fail, 0); - /* - * set all elements of fail to the value of fail's element 0, so - * we can select the current fpscr values on failure. - */ - fail = spu_shuffle(fail, fail, splat_ele0); - - cur_fpscr = spu_mffpscr(); - /* - * We don't have to mask the round element selection out since it - * is shifted out. - */ - new_fpscr = spu_promote(umode << 8, 0); - new_fpscr = spu_and(new_fpscr, clear_non_ele0); - /* - * Use the element bits of the mode to set the mask. - */ - mask_fpscr = spu_promote((umode & FE_MASK_ROUND), 0); - new_fpscr = spu_sel(cur_fpscr, new_fpscr, mask_fpscr); - /* - * Use the current fpscr value if the round mode was invalid - */ - new_fpscr = spu_sel(new_fpscr, cur_fpscr, fail); - spu_mtfpscr(new_fpscr); - - return spu_extract(fail, 0); -} -#endif /* _FESETROUND_H_ */ diff --git a/newlib/libm/machine/spu/headers/fetestexcept.h b/newlib/libm/machine/spu/headers/fetestexcept.h deleted file mode 100644 index e89049d00..000000000 --- a/newlib/libm/machine/spu/headers/fetestexcept.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _FETESTEXCEPT_H_ -#define _FETESTEXCEPT_H_ 1 - -#include -#include -#include "headers/fefpscr.h" - -static __inline int _fetestexcept(int excepts) -{ - vec_uint4 fpscr; - - excepts &= FE_ALL_EXCEPT; - fpscr = spu_mffpscr(); - return (__pack_fpscr(fpscr) & excepts); -} - -#endif /* _FETESTEXCEPT_H_ */ diff --git a/newlib/libm/machine/spu/headers/feupdateenv.h b/newlib/libm/machine/spu/headers/feupdateenv.h deleted file mode 100644 index a946608c4..000000000 --- a/newlib/libm/machine/spu/headers/feupdateenv.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _FEUPDATEENV_H_ -#define _FEUPDATEENV_H_ 1 - -#include -#include -#include "headers/fefpscr.h" - -static __inline void _feupdateenv(const fenv_t *envp) -{ - vec_uint4 fpscr; - - fpscr = __unpack_fpscr(*envp); - spu_mtfpscr(fpscr); -} - -#endif /* _FEUPDATEENV_H_ */ diff --git a/newlib/libm/machine/spu/headers/floor.h b/newlib/libm/machine/spu/headers/floor.h deleted file mode 100644 index 6675b948d..000000000 --- a/newlib/libm/machine/spu/headers/floor.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _FLOOR_H_ -#define _FLOOR_H_ 1 - -#include -#include "headers/vec_literal.h" - -/* Round the input downwards to the nearest integer. - */ -static __inline double _floor(double x) -{ - vec_uchar16 swap_words = VEC_LITERAL(vec_uchar16, 4,5,6,7, 0,1,2,3, 12,13,14,15, 8,9,10,11); - vec_uchar16 splat_hi = VEC_LITERAL(vec_uchar16, 0,1,2,3,0,1,2,3, 8,9,10,11, 8,9,10,11); - vec_uint4 one = VEC_LITERAL(vec_uint4, 0, 1, 0, 1); - vec_int4 exp, shift; - vec_uint4 mask, mask_1, frac_mask, addend, insert, pos, equal0; - vec_ullong2 sign = VEC_SPLAT_U64(0x8000000000000000ULL); - vec_double2 in, in_hi, out; - vec_double2 minus_one = VEC_SPLAT_F64(-1.0); - - in = spu_promote(x, 0); - - /* This function generates the following component - * based upon the inputs. - * - * mask = bits of the input that need to be replaced. - * insert = value of the bits that need to be replaced - * addend = value to be added to perform function. - * - * These are applied as follows:. - * - * out = ((in & mask) | insert) + addend - */ - in_hi = spu_shuffle(in, in, splat_hi); - pos = spu_cmpgt((vec_int4)in_hi, -1); - exp = spu_and(spu_rlmask((vec_int4)in_hi, -20), 0x7FF); - shift = spu_sub(VEC_LITERAL(vec_int4, 1023, 1043, 1023, 1043), exp); - - /* clamp shift to the range 0 to -31. - */ - shift = spu_sel(VEC_SPLAT_S32(-32), spu_andc(shift, (vec_int4)spu_cmpgt(shift, 0)), spu_cmpgt(shift, -32)); - - frac_mask = spu_rlmask(VEC_LITERAL(vec_uint4, 0xFFFFF, -1, 0xFFFFF, -1), shift); - mask = spu_orc(frac_mask, spu_cmpgt(exp, 0x3FE)); - - /* addend = ((in & mask) && (in >= 0)) ? mask+1 : 0 - */ - mask_1 = spu_addx(mask, one, spu_rlqwbyte(spu_genc(mask, one), 4)); - - equal0 = spu_cmpeq(spu_and((vec_uint4)in, mask), 0); - addend = spu_andc(spu_andc(mask_1, pos), - spu_and(equal0, spu_shuffle(equal0, equal0, swap_words))); - - insert = spu_andc(spu_andc((vec_uint4)minus_one, pos), - spu_cmpgt((vec_uint4)spu_add(exp, -1), 1022)); - - in = spu_sel(in, (vec_double2)insert, spu_andc((vec_ullong2)mask, sign)); - out = (vec_double2)spu_addx((vec_uint4)in, addend, - spu_rlqwbyte(spu_genc((vec_uint4)in, addend), 4)); - - return (spu_extract(out, 0)); -} -#endif /* _FLOOR_H_ */ diff --git a/newlib/libm/machine/spu/headers/floord2.h b/newlib/libm/machine/spu/headers/floord2.h deleted file mode 100644 index baf5083ce..000000000 --- a/newlib/libm/machine/spu/headers/floord2.h +++ /dev/null @@ -1,122 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ - -#ifndef _FLOORD2_H_ -#define _FLOORD2_H_ 1 - -#include - - -/* - * FUNCTION - * vector double _floord2(vector double x) - * - * DESCRIPTION - * The _floord2 function rounds the elements of an vector double - * input vector downwards to their nearest integer representable - * as a double. - * - */ -static __inline vector double _floord2(vector double in) -{ - vec_uchar16 swap_words = (vec_uchar16) { 4,5,6,7, 0,1,2,3, 12,13,14,15, 8,9,10,11 }; - vec_uchar16 splat_hi = (vec_uchar16) { 0,1,2,3, 0,1,2,3, 8,9,10,11, 8,9,10,11 }; - vec_uint4 one = (vec_uint4) { 0, 1, 0, 1 }; - vec_int4 exp, shift; - vec_uint4 mask, mask_1, frac_mask, addend, insert, pos, equal0; - vec_ullong2 sign = spu_splats(0x8000000000000000ULL); - vec_double2 in_hi, out; - vec_double2 minus_one = spu_splats(-1.0); - - /* This function generates the following component - * based upon the inputs. - * - * mask = bits of the input that need to be replaced. - * insert = value of the bits that need to be replaced - * addend = value to be added to perform function. - * - * These are applied as follows:. - * - * out = ((in & mask) | insert) + addend - */ - in_hi = spu_shuffle(in, in, splat_hi); - pos = spu_cmpgt((vec_int4)in_hi, -1); - exp = spu_and(spu_rlmask((vec_int4)in_hi, -20), 0x7FF); - shift = spu_sub(((vec_int4) { 1023, 1043, 1023, 1043 } ), exp); - - /* clamp shift to the range 0 to -31. - */ - shift = spu_sel(spu_splats(-32), spu_andc(shift, (vec_int4)spu_cmpgt(shift, 0)), spu_cmpgt(shift, -32)); - - frac_mask = spu_rlmask(((vec_uint4) { 0xFFFFF, -1, 0xFFFFF, -1 } ), shift); - mask = spu_orc(frac_mask, spu_cmpgt(exp, 0x3FE)); - - /* addend = ((in & mask) && (in >= 0)) ? mask+1 : 0 - */ - mask_1 = spu_addx(mask, one, spu_rlqwbyte(spu_genc(mask, one), 4)); - - equal0 = spu_cmpeq(spu_and((vec_uint4)in, mask), 0); - addend = spu_andc(spu_andc(mask_1, pos), spu_and(equal0, spu_shuffle(equal0, equal0, swap_words))); - - insert = spu_andc(spu_andc((vec_uint4)minus_one, pos), - spu_cmpgt((vec_uint4)spu_add(exp, -1), 1022)); - - in = spu_sel(in, (vec_double2)insert, spu_andc((vec_ullong2)mask, sign)); - out = (vec_double2)spu_addx((vec_uint4)in, addend, spu_rlqwbyte(spu_genc((vec_uint4)in, addend), 4)); - - return (out); -} - -#endif /* _FLOORD2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/floorf.h b/newlib/libm/machine/spu/headers/floorf.h deleted file mode 100644 index e6cc0f89e..000000000 --- a/newlib/libm/machine/spu/headers/floorf.h +++ /dev/null @@ -1,123 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _FLOORF_H_ -#define _FLOORF_H_ 1 - -#include -#include "headers/vec_literal.h" - -/* - * FUNCTION - * float _floorf(float value) - * - * DESCRIPTION - * The _floorf routine round the input value "value" downwards to the - * nearest integer returning the result as a float. Two forms of the - * floor function are provided - full range and limited (integer) - * range. - * - * The full range form (default) provides floor computation on - * all IEEE floating point values. The floor of NANs remain NANs. - * The floor of denorms results in zero. - * - * The limited range form (selected by defining FLOOR_INTEGER_RANGE) - * compute ths floor of all floating-point values in the 32-bit - * signed integer range. Values outside this range get clamped. - */ - -static __inline float _floorf(float value) -{ -#ifdef FLOOR_INTEGER_RANGE - /* 32-BIT INTEGER DYNAMIC RANGE - */ - union { - float f; - signed int i; - unsigned int ui; - } bias; - - bias.f = value; - - /* If positive, bias the input value to truncate towards - * positive infinity, instead of zero. - */ - bias.ui = (unsigned int)(bias.i >> 31) & 0x3F7FFFFF; - value -= bias.f; - - /* Remove fraction bits by casting to an integer and back - * to a floating-point value. - */ - return ((float)((int)value)); - -#else /* !FLOOR_INTEGER_RANGE */ - /* FULL FLOATING-POINT RANGE - */ - vec_int4 exp, shift; - vec_uint4 mask, frac_mask, addend, insert, pos; - vec_float4 in, out; - - in = spu_promote(value, 0); - - /* This function generates the following component - * based upon the inputs. - * - * mask = bits of the input that need to be replaced. - * insert = value of the bits that need to be replaced - * addend = value to be added to perform function. - * - * These are applied as follows:. - * - * out = ((in & mask) | insert) + addend - */ - pos = spu_cmpgt((vec_int4)in, -1); - exp = spu_and(spu_rlmask((vec_int4)in, -23), 0xFF); - - shift = spu_sub(127, exp); - - frac_mask = spu_and(spu_rlmask(VEC_SPLAT_U32(0x7FFFFF), shift), - spu_cmpgt((vec_int4)shift, -31)); - - mask = spu_orc(frac_mask, spu_cmpgt(exp, 126)); - - addend = spu_andc(spu_andc(spu_add(mask, 1), pos), - spu_cmpeq(spu_and((vec_uint4)in, mask), 0)); - - insert = spu_andc(spu_andc(VEC_SPLAT_U32(0xBF800000), pos), - spu_cmpgt((vec_uint4)spu_add(exp, -1), 126)); - - out = (vec_float4)spu_add(spu_sel((vec_uint4)in, insert, mask), addend); - - return (spu_extract(out, 0)); -#endif /* FLOOR_INTEGER_RANGE */ -} -#endif /* _FLOORF_H_ */ diff --git a/newlib/libm/machine/spu/headers/floorf4.h b/newlib/libm/machine/spu/headers/floorf4.h deleted file mode 100644 index 779bd3225..000000000 --- a/newlib/libm/machine/spu/headers/floorf4.h +++ /dev/null @@ -1,117 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _FLOORF4_H_ -#define _FLOORF4_H_ 1 - -#include - - -/* - * FUNCTION - * vector float _floorf4(vector float value) - * - * DESCRIPTION - * The _floorf4 routine rounds a vector of input values "value" downwards - * to their nearest integer returning the result as a vector of floats. - * - * The full range form (default) provides floor computation on - * all IEEE floating point values. The floor of NANs remain NANs. - * The floor of denorms results in zero. - * - */ -static __inline vector float _floorf4(vector float value) -{ - - /* FULL FLOATING-POINT RANGE - */ - vec_int4 exp, shift; - vec_uint4 mask, frac_mask, addend, insert, pos; - vec_float4 out; - - /* This function generates the following component - * based upon the inputs. - * - * mask = bits of the input that need to be replaced. - * insert = value of the bits that need to be replaced - * addend = value to be added to perform function. - * - * These are applied as follows:. - * - * out = ((in & mask) | insert) + addend - */ - pos = spu_cmpgt((vec_int4)value, -1); - exp = spu_and(spu_rlmask((vec_int4)value, -23), 0xFF); - - shift = spu_sub(127, exp); - - frac_mask = spu_and(spu_rlmask(spu_splats((unsigned int)0x7FFFFF), shift), - spu_cmpgt((vec_int4)shift, -31)); - - mask = spu_orc(frac_mask, spu_cmpgt(exp, 126)); - - addend = spu_andc(spu_andc(spu_add(mask, 1), pos), spu_cmpeq(spu_and((vec_uint4)value, mask), 0)); - - insert = spu_andc(spu_andc(spu_splats((unsigned int)0xBF800000), pos), - spu_cmpgt((vec_uint4)spu_add(exp, -1), 126)); - - out = (vec_float4)spu_add(spu_sel((vec_uint4)value, insert, mask), addend); - - /* Preserve orignal sign bit (for -0 case) - */ - out = spu_sel(out, value, spu_splats((unsigned int)0x80000000)); - - return (out); -} -#endif /* _FLOORF4_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/fma.h b/newlib/libm/machine/spu/headers/fma.h deleted file mode 100644 index c3e910696..000000000 --- a/newlib/libm/machine/spu/headers/fma.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ - -#ifndef _FMA_H_ -#define _FMA_H_ 1 - -#include - -static __inline double _fma(double x, double y, double z) -{ - vec_double2 vx, vy, vz, vout;; - - vx = spu_promote(x, 0); - vy = spu_promote(y, 0); - vz = spu_promote(z, 0); - vout = spu_madd(vx, vy, vz); - return (spu_extract(vout, 0)); -} -#endif /* _FMA_H_ */ diff --git a/newlib/libm/machine/spu/headers/fmaf.h b/newlib/libm/machine/spu/headers/fmaf.h deleted file mode 100644 index 7ae09e337..000000000 --- a/newlib/libm/machine/spu/headers/fmaf.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _FMAF_H_ -#define _FMAF_H_ 1 - -#include - -static __inline float _fmaf(float x, float y, float z) -{ - return (spu_extract(spu_madd(spu_promote(x, 0), spu_promote(y, 0), - spu_promote(z, 0)), 0)); -} -#endif /* _FMAF_H_ */ diff --git a/newlib/libm/machine/spu/headers/fmax.h b/newlib/libm/machine/spu/headers/fmax.h deleted file mode 100644 index f3e3358e6..000000000 --- a/newlib/libm/machine/spu/headers/fmax.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _FMAX_H_ -#define _FMAX_H_ 1 - -#include -#include "headers/vec_literal.h" - -/* Return the maximum numeric value of their arguments. If one argument - * is a NaN, fmax returns the other value. If both are NaNs, then a NaN - * is returned. - * - * Notes: - * 1) Double precision denorms equate to zero so two denorms compare - * equal thereby making the following true for two denorm inputs - * fmax(a, b) != fmax(b, a); - */ -static __inline double _fmax(double x, double y) -{ - vec_uint4 nan_x, selector, abs_x, gt, eq; - vec_uint4 sign = VEC_LITERAL(vec_uint4, 0x80000000, 0, 0x80000000, 0); - vec_uint4 infinity = VEC_LITERAL(vec_uint4, 0x7FF00000, 0, 0x7FF00000, 0); - vec_double2 vx, vy, diff, max; - - vx = spu_promote(x, 0); - vy = spu_promote(y, 0); - - /* If x is a NaN, then select y as max - */ - abs_x = spu_andc((vec_uint4)vx, sign); - gt = spu_cmpgt(abs_x, infinity); - eq = spu_cmpeq(abs_x, infinity); - - nan_x = spu_or(gt, spu_and(eq, spu_rlqwbyte(gt, 4))); - - diff = spu_sub(vx, vy); - selector = spu_orc(nan_x, spu_cmpgt((vec_int4)diff, -1)); - selector = spu_maskw(spu_extract(selector, 0)); - - max = spu_sel(vx, vy, (vec_ullong2)selector); - - return (spu_extract(max, 0)); -} - -#endif /* _FMAX_H_ */ diff --git a/newlib/libm/machine/spu/headers/fmaxf.h b/newlib/libm/machine/spu/headers/fmaxf.h deleted file mode 100644 index e1c2352f2..000000000 --- a/newlib/libm/machine/spu/headers/fmaxf.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _FMAXF_H_ -#define _FMAXF_H_ 1 - -#include - -/* Return the maximum numeric value of their arguments. - */ -static __inline float _fmaxf(float x, float y) -{ - vec_float4 vx, vy; - - vx = spu_promote(x, 0); - vy = spu_promote(y, 0); - return (spu_extract(spu_sel(vx, vy, spu_cmpgt(vy, vx)), 0)); -} -#endif /* _FMAXF_H_ */ diff --git a/newlib/libm/machine/spu/headers/fmin.h b/newlib/libm/machine/spu/headers/fmin.h deleted file mode 100644 index 45db5191e..000000000 --- a/newlib/libm/machine/spu/headers/fmin.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _FMIN_H_ -#define _FMIN_H_ 1 - -#include -#include "headers/vec_literal.h" - -/* Return the minimum numeric value of their arguments. If one argument - * is a NaN, fmin returns the other value. If both are NaNs, then a NaN - * is returned. - * - * Notes: - * 1) Double precision denorms equate to zero so two denorms compare - * equal thereby making the following true for two denorm inputs - * fmin(a, b) != fmin(b, a); - */ - -static __inline double _fmin(double x, double y) -{ - vec_uint4 nan_x, selector, abs_x, gt, eq; - vec_uint4 sign = VEC_LITERAL(vec_uint4, 0x80000000, 0, 0x80000000, 0); - vec_uint4 infinity = VEC_LITERAL(vec_uint4, 0x7FF00000, 0, 0x7FF00000, 0); - vec_double2 vx, vy, diff, min; - - vx = spu_promote(x, 0); - vy = spu_promote(y, 0); - - /* If x is a NaN, then select y as min - */ - abs_x = spu_andc((vec_uint4)vx, sign); - gt = spu_cmpgt(abs_x, infinity); - eq = spu_cmpeq(abs_x, infinity); - - nan_x = spu_or(gt, spu_and(eq, spu_rlqwbyte(gt, 4))); - - diff = spu_sub(vy, vx); - selector = spu_orc(nan_x, spu_cmpgt((vec_int4)diff, -1)); - selector = spu_maskw(spu_extract(selector, 0)); - - min = spu_sel(vx, vy, (vec_ullong2)selector); - - return (spu_extract(min, 0)); -} -#endif /* _FMIN_H_ */ diff --git a/newlib/libm/machine/spu/headers/fminf.h b/newlib/libm/machine/spu/headers/fminf.h deleted file mode 100644 index 56fa556af..000000000 --- a/newlib/libm/machine/spu/headers/fminf.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _FMINF_H_ -#define _FMINF_H_ 1 - -#include - -/* Return the minimum numeric value of their arguments. - */ -static __inline float _fminf(float x, float y) -{ - vec_float4 vx, vy; - - vx = spu_promote(x, 0); - vy = spu_promote(y, 0); - return (spu_extract(spu_sel(vx, vy, spu_cmpgt(vx, vy)), 0)); -} -#endif /* _FMINF_H_ */ diff --git a/newlib/libm/machine/spu/headers/fmod.h b/newlib/libm/machine/spu/headers/fmod.h deleted file mode 100644 index 0236da187..000000000 --- a/newlib/libm/machine/spu/headers/fmod.h +++ /dev/null @@ -1,166 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _FMOD_H_ -#define _FMOD_H_ 1 - -#include -#include -#include "headers/vec_literal.h" - -/* This implementation returns zero if y is a denorm or zero. - */ -static __inline double _fmod(double x, double y) -{ - int n, shift; - vec_uchar16 swap_words = VEC_LITERAL(vec_uchar16, 4,5,6,7, 0,1,2,3, 12,13,14,15, 8,9,10,11); - vec_uchar16 propagate = VEC_LITERAL(vec_uchar16, 4,5,6,7, 192,192,192,192, 12,13,14,15, 192,192,192,192); - vec_uchar16 splat_hi = VEC_LITERAL(vec_uchar16, 0,1,2,3,0,1,2,3, 8,9,10,11, 8,9,10,11); - vec_uint4 vx, vy, z; - vec_uint4 x_hi, y_hi; - vec_uint4 abs_x, abs_y; - vec_uint4 exp_x, exp_y; - vec_uint4 zero_x, zero_y; - vec_uint4 logb_x, logb_y; - vec_uint4 mant_x, mant_y; - vec_uint4 normal, norm, denorm; - vec_uint4 result, result0, resultx, cnt, sign, borrow; - vec_uint4 lsb = (vec_uint4)(VEC_SPLAT_U64(0x0000000000000001ULL)); - vec_uint4 sign_mask = (vec_uint4)(VEC_SPLAT_U64(0x8000000000000000ULL)); - vec_uint4 implied_1 = (vec_uint4)(VEC_SPLAT_U64(0x0010000000000000ULL)); - vec_uint4 mant_mask = (vec_uint4)(VEC_SPLAT_U64(0x000FFFFFFFFFFFFFULL)); - vec_ullong2 domain; - vec_int4 verrno; - vec_double2 vc = { 0.0, 0.0 }; - vec_int4 fail = { EDOM, EDOM, EDOM, EDOM }; - - vx = (vec_uint4)spu_promote(x, 0); - vy = (vec_uint4)spu_promote(y, 0); - - abs_x = spu_andc(vx, sign_mask); - abs_y = spu_andc(vy, sign_mask); - - sign = spu_and(vx, sign_mask); - - x_hi = spu_shuffle(abs_x, abs_x, splat_hi); - y_hi = spu_shuffle(abs_y, abs_y, splat_hi); - - /* Determine ilogb of abs_x and abs_y and - * extract the mantissas (mant_x, mant_y) - */ - exp_x = spu_rlmask(x_hi, -20); - exp_y = spu_rlmask(y_hi, -20); - - resultx = spu_cmpgt(y_hi, x_hi); - - zero_x = spu_cmpeq(exp_x, 0); - zero_y = spu_cmpeq(exp_y, 0); - - logb_x = spu_add(exp_x, -1023); - logb_y = spu_add(exp_y, -1023); - - mant_x = spu_andc(spu_sel(implied_1, abs_x, mant_mask), zero_x); - mant_y = spu_andc(spu_sel(implied_1, abs_y, mant_mask), zero_y); - - /* Compute fixed point fmod of mant_x and mant_y. Set the flag, - * result0, to all ones if we detect that the final result is - * ever 0. - */ - result0 = spu_or(zero_x, zero_y); - - n = spu_extract(spu_sub(logb_x, logb_y), 0); - - while (n-- > 0) { - borrow = spu_genb(mant_x, mant_y); - borrow = spu_shuffle(borrow, borrow, propagate); - z = spu_subx(mant_x, mant_y, borrow); - - result0 = spu_or(spu_cmpeq(spu_or(z, spu_shuffle(z, z, swap_words)), 0), result0); - - mant_x = spu_sel(spu_slqw(mant_x, 1), spu_andc(spu_slqw(z, 1), lsb), - spu_cmpgt((vec_int4)spu_shuffle(z, z, splat_hi), -1)); - } - - borrow = spu_genb(mant_x, mant_y); - borrow = spu_shuffle(borrow, borrow, propagate); - z = spu_subx(mant_x, mant_y, borrow); - - mant_x = spu_sel(mant_x, z, - spu_cmpgt((vec_int4)spu_shuffle(z, z, splat_hi), -1)); - mant_x = spu_andc(mant_x, VEC_LITERAL(vec_uint4, 0,0,-1,-1)); - - result0 = spu_or(spu_cmpeq(spu_or(mant_x, spu_shuffle(mant_x, mant_x, swap_words)), 0), result0); - - /* Convert the result back to floating point and restore - * the sign. If we flagged the result to be zero (result0), - * zero it. If we flagged the result to equal its input x, - * (resultx) then return x. - * - * Double precision generates a denorm for an output. - */ - cnt = spu_cntlz(mant_x); - cnt = spu_add(cnt, spu_and(spu_rlqwbyte(cnt, 4), spu_cmpeq(cnt, 32))); - cnt = spu_add(spu_shuffle(cnt, cnt, splat_hi), -11); - - shift = spu_extract(exp_y, 0) - 1; - denorm = spu_slqwbytebc(spu_slqw(mant_x, shift), shift); - - exp_y = spu_sub(exp_y, cnt); - - normal = spu_cmpgt((vec_int4)exp_y, 0); - - /* Normalize normal results, denormalize denorm results. - */ - shift = spu_extract(cnt, 0); - norm = spu_slqwbytebc(spu_slqw(spu_andc(mant_x, VEC_LITERAL(vec_uint4, 0x00100000, 0, -1, -1)), shift), shift); - - mant_x = spu_sel(denorm, norm, normal); - - exp_y = spu_and(spu_rl(exp_y, 20), normal); - - result = spu_sel(exp_y, spu_or(sign, mant_x), VEC_LITERAL(vec_uint4, 0x800FFFFF, -1, 0x800FFFFF, -1)); - - result = spu_sel(spu_andc(result, spu_rlmask(result0, -1)), vx, - resultx); - -#ifndef _IEEE_LIBM - /* - * If y is zero, set errno to EDOM - */ - domain = spu_cmpeq(vc, (vec_double2) vy); - verrno = spu_splats(errno); - errno = spu_extract(spu_sel(verrno, fail, (vector unsigned int) domain), 0); -#endif - - return (spu_extract((vec_double2)result, 0)); -} -#endif /* _FMOD_H_ */ diff --git a/newlib/libm/machine/spu/headers/fmodf.h b/newlib/libm/machine/spu/headers/fmodf.h deleted file mode 100644 index a62141f97..000000000 --- a/newlib/libm/machine/spu/headers/fmodf.h +++ /dev/null @@ -1,170 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _FMODF_H_ -#define _FMODF_H_ 1 - -#include -#include -#include "headers/vec_literal.h" - -#include "fabsf.h" - -/* - * FUNCTION - * float _fmodf(float x, float y) - * - * DESCRIPTION - * The _fmodf subroutine computes the remainder of - * dividing x by y. The return value is x - n*y, where n is - * the quotient of x/y, rounded towards zero. - * - * The full range form (default) provides fmod computation on - * all IEEE floating point values (excluding floating overflow - * or underflow). - * - * The limited range form (selected by defining FMODF_INTEGER_RANGE) - * compute fmod of all floating-point x/y values in the 32-bit - * signed integer range. Values outside this range get clamped. - */ - -static __inline float _fmodf(float x, float y) -{ -#ifdef FMODF_INTEGER_RANGE - /* 32-BIT INTEGER DYNAMIC RANGE - */ - float abs_y; - float quotient; - - abs_y = _fabsf(y); - quotient = x/abs_y; - - return (abs_y*(quotient - ((float)((int)quotient)))); - -#else /* !FMODF_INTEGER_RANGE */ - /* FULL FLOATING-POINT RANGE - */ - int n; - vec_uint4 vx, vy, z; - vec_uint4 abs_x, abs_y; - vec_uint4 exp_x, exp_y; - vec_uint4 zero_x, zero_y; - vec_uint4 logb_x, logb_y; - vec_uint4 mant_x, mant_y; - vec_uint4 result, result0, resultx, cnt, sign; - vec_uint4 sign_mask = VEC_SPLAT_U32(0x80000000); - vec_uint4 implied_1 = VEC_SPLAT_U32(0x00800000); - vec_uint4 mant_mask = VEC_SPLAT_U32(0x007FFFFF); - vec_uint4 domain; - vec_int4 verrno; - vec_float4 vc = { 0.0, 0.0, 0.0, 0.0 }; - vec_int4 fail = { EDOM, EDOM, EDOM, EDOM }; - - vx = (vec_uint4)spu_promote(x, 0); - vy = (vec_uint4)spu_promote(y, 0); - - abs_x = spu_andc(vx, sign_mask); - abs_y = spu_andc(vy, sign_mask); - - sign = spu_and(vx, sign_mask); - - /* Determine ilogb of abs_x and abs_y and - * extract the mantissas (mant_x, mant_y) - */ - exp_x = spu_rlmask(abs_x, -23); - exp_y = spu_rlmask(abs_y, -23); - - resultx = spu_cmpgt(abs_y, abs_x); - - zero_x = spu_cmpeq(exp_x, 0); - zero_y = spu_cmpeq(exp_y, 0); - - logb_x = spu_add(exp_x, -127); - logb_y = spu_add(exp_y, -127); - - mant_x = spu_andc(spu_sel(implied_1, abs_x, mant_mask), zero_x); - mant_y = spu_andc(spu_sel(implied_1, abs_y, mant_mask), zero_y); - - /* Compute fixed point fmod of mant_x and mant_y. Set the flag, - * result0, to all ones if we detect that the final result is - * ever 0. - */ - result0 = spu_or(zero_x, zero_y); - - n = spu_extract(spu_sub(logb_x, logb_y), 0); - - while (n-- > 0) { - z = spu_sub(mant_x, mant_y); - - result0 = spu_or(spu_cmpeq(z, 0), result0); - - mant_x = spu_sel(spu_add(mant_x, mant_x), spu_add(z, z), - spu_cmpgt((vec_int4)z, -1)); - } - - z = spu_sub(mant_x, mant_y); - mant_x = spu_sel(mant_x, z, spu_cmpgt((vec_int4)z, -1)); - - result0 = spu_or(spu_cmpeq(mant_x, 0), result0); - - /* Convert the result back to floating point and restore - * the sign. If we flagged the result to be zero (result0), - * zero it. If we flagged the result to equal its input x, - * (resultx) then return x. - */ - cnt = spu_add(spu_cntlz(mant_x), -8); - - mant_x = spu_rl(spu_andc(mant_x, implied_1), (vec_int4)cnt); - - exp_y = spu_sub(exp_y, cnt); - result0 = spu_orc(result0, spu_cmpgt((vec_int4)exp_y, 0)); /* zero denorm results */ - exp_y = spu_rl(exp_y, 23); - - - result = spu_sel(exp_y, spu_or(sign, mant_x), VEC_SPLAT_U32(0x807FFFFF)); - - result = spu_sel(spu_andc(result, spu_rlmask(result0, -1)), vx, - resultx); - -#ifndef _IEEE_LIBM - /* - * If y is zero, set errno to EDOM - */ - domain = spu_cmpeq(vc, (vec_float4) vy); - verrno = spu_splats(errno); - errno = spu_extract(spu_sel(verrno, fail, (vector unsigned int) domain), 0); -#endif - - return (spu_extract((vec_float4)result, 0)); -#endif /* FMODF_INTEGER_RANGE */ -} -#endif /* _FMODF_H_ */ diff --git a/newlib/libm/machine/spu/headers/frexp.h b/newlib/libm/machine/spu/headers/frexp.h deleted file mode 100644 index 8b525c76e..000000000 --- a/newlib/libm/machine/spu/headers/frexp.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _FREXP_H_ -#define _FREXP_H_ 1 - -#include -#include "headers/vec_literal.h" - -/* Return the normalized fraction and exponent to the number x. - * Double precision denorms treated as zero and return a 0 - * fraction and 0 exponent. The results are undefined for infinities - * and NaNs (double precision only). - */ -static __inline double _frexp(double x, int *pexp) -{ - vec_int4 exp; - vec_uint4 denorm, mask; - vec_double2 in, mant; - vec_double2 half = VEC_SPLAT_F64(0.5); - vec_ullong2 exp_mask = VEC_SPLAT_U64(0x7FF0000000000000ULL); - - in = spu_promote(x, 0); - - /* Normalize the mantissa (fraction part). - */ - mant = spu_sel(in, half, exp_mask); - - /* Zero the mantissa if the input is a denorm or zero - */ - exp = spu_and(spu_rlmask((vec_int4)in, -20), 0x7FF); - denorm = spu_cmpeq(exp, 0); - mask = spu_shuffle(denorm, denorm, VEC_SPLAT_U8(0)); - mant = spu_andc(mant, (vec_double2)mask); - - /* Zero exponent if zero or denorm input. Otherwise, compute - * exponent by removing the bias. - */ - exp = spu_andc(spu_add(exp, -1022), (vec_int4)mask); - - *pexp = spu_extract(exp, 0); - - return (spu_extract(mant, 0)); -} -#endif /* _FREXPF_H_ */ diff --git a/newlib/libm/machine/spu/headers/frexpf.h b/newlib/libm/machine/spu/headers/frexpf.h deleted file mode 100644 index 5de31da98..000000000 --- a/newlib/libm/machine/spu/headers/frexpf.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _FREXPF_H_ -#define _FREXPF_H_ 1 - -#include -#include "headers/vec_literal.h" - -/* Return the normalized fraction and exponent to the number x. - */ -static __inline float _frexpf(float x, int *pexp) -{ - vec_int4 exp; - vec_uint4 mask; - vec_uint4 exp_mask = VEC_SPLAT_U32(0x7F800000); - vec_float4 half = VEC_SPLAT_F32(0.5f); - vec_float4 in, mant; - - in = spu_promote(x, 0); - - /* Normalize the mantissa (fraction part). - */ - mant = spu_sel(in, half, exp_mask); - - /* Zero the mantissa if the input is a denorm or zero - */ - exp = spu_and(spu_rlmask((vec_int4)in, -23), 0xFF); - mask = spu_cmpeq(exp, 0); - mant = spu_andc(mant, (vec_float4)mask); - - /* Zero exponent if zero or denorm input. Otherwise, compute - * exponent by removing the bias. - */ - exp = spu_andc(spu_add(exp, -126), (vec_int4)mask); - *pexp = spu_extract(exp, 0); - - return (spu_extract(mant, 0)); -} -#endif /* _FREXPF_H_ */ diff --git a/newlib/libm/machine/spu/headers/hypot.h b/newlib/libm/machine/spu/headers/hypot.h deleted file mode 100644 index e0fafb38c..000000000 --- a/newlib/libm/machine/spu/headers/hypot.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/hypotd2.h" - -static __inline double _hypot(double x, double y) -{ - return spu_extract(_hypotd2(spu_promote(x, 0), spu_promote(y, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/hypotd2.h b/newlib/libm/machine/spu/headers/hypotd2.h deleted file mode 100644 index e8f659579..000000000 --- a/newlib/libm/machine/spu/headers/hypotd2.h +++ /dev/null @@ -1,134 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ - -#ifndef _HYPOTD2_H_ -#define _HYPOTD2_H_ 1 - -#include -#include "sqrtd2.h" - -/* - * FUNCTION - * vector double hypotd2(vector double x, vector double y) - * - * DESCRIPTION - * The function hypotd2 returns a double vector in which each element is - * the square root of the sum of the squares of the corresponding - * elements of x and y. - * - * The purpose of this function is to avoid overflow during - * intermediate calculations, and therefore it is slower than - * simply calcualting sqrt(x^2 + y^2). - * - * This function is performed by factoring out the larger of the 2 - * input exponents and moving this factor outside of the sqrt calculation. - * This will minimize the possibility of over/underflow when the square - * of the values are calculated. Think of it as normalizing the larger - * input to the range [1,2). - * - * Special Cases: - * - hypot(x, +/-0) returns |x| - * - hypot(+/- infinity, y) returns +infinity - * - hypot(+/- infinity, NaN) returns +infinity - * - */ -static __inline vector double _hypotd2(vector double x, vector double y) -{ - vector unsigned long long emask = spu_splats(0x7FF0000000000000ull); - vector unsigned long long mmask = spu_splats(0x000FFFFFFFFFFFFFull); - vector signed long long bias = spu_splats(0x3FF0000000000000ll); - vector double oned = spu_splats(1.0); - vector double sbit = spu_splats(-0.0); - vector double inf = (vector double)spu_splats(0x7FF0000000000000ull); - vector double max, max_e, max_m; - vector double min, min_e, min_m; - vector unsigned long long xgty; - vector double sum; - vector double result; - - /* Only need absolute values for this function */ - x = spu_andc(x, sbit); - y = spu_andc(y, sbit); - xgty = spu_cmpgt(x,y); - - max = spu_sel(y,x,xgty); - min = spu_sel(x,y,xgty); - - /* Extract the exponents and mantissas */ - max_e = (vec_double2)spu_and((vec_ullong2)max, emask); - max_m = (vec_double2)spu_and((vec_ullong2)max, mmask); - min_e = (vec_double2)spu_and((vec_ullong2)min, emask); - min_m = (vec_double2)spu_and((vec_ullong2)min, mmask); - - /* Factor-out max exponent here by subtracting from min exponent */ - vec_llong2 min_e_int = (vec_llong2)spu_sub((vec_int4)min_e, (vec_int4)max_e); - min_e = (vec_double2)spu_add((vec_int4)min_e_int, (vec_int4)bias); - - /* If the new min exponent is too small, just set it to 0. It - * wouldn't contribute to the final result in either case. - */ - min_e = spu_sel(min_e, sbit, spu_cmpgt(sbit, min_e)); - - /* Combine new exponents with original mantissas */ - max = spu_or(oned, max_m); - min = spu_or(min_e, min_m); - - sum = _sqrtd2(spu_madd(max, max, spu_mul(min, min))); - sum = spu_mul(max_e, sum); - - /* Special case: x = +/- infinity */ - result = spu_sel(sum, inf, spu_cmpeq(x, inf)); - - return result; -} - -#endif /* _HYPOTD2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/hypotf.h b/newlib/libm/machine/spu/headers/hypotf.h deleted file mode 100644 index 373b9d005..000000000 --- a/newlib/libm/machine/spu/headers/hypotf.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/hypotf4.h" - -static __inline float _hypotf(float x, float y) -{ - return spu_extract(_hypotf4(spu_promote(x, 0), spu_promote(y, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/hypotf4.h b/newlib/libm/machine/spu/headers/hypotf4.h deleted file mode 100644 index 4c4fb40c1..000000000 --- a/newlib/libm/machine/spu/headers/hypotf4.h +++ /dev/null @@ -1,139 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _HYPOTF4_H_ -#define _HYPOTF4_H_ 1 - -#include - -#include "sqrtf4.h" - -/* - * FUNCTION - * vector float _hypotf4(vector float x, vector float y) - * - * DESCRIPTION - * The function hypotf4 returns a float vector in which each element is - * the square root of the sum of the squares of the corresponding - * elements of x and y. In other words, each element is sqrt(x^2 + y^2). - * - * The purpose of this function is to avoid overflow during - * intermediate calculations, and therefore it is slower than - * simply calcualting sqrt(x^2 + y^2). - * - * This function is performed by factoring out the larger of the 2 - * input exponents and moving this factor outside of the sqrt calculation. - * This will minimize the possibility of over/underflow when the square - * of the values are calculated. Think of it as normalizing the larger - * input to the range [1,2). - * - * - * Special Cases: - * - hypot(x, +/-0) returns |x| - * - hypot(+/- infinity, y) returns +infinity - * - hypot(+/- infinity, NaN) returns +infinity - * - */ - - -static __inline vector float _hypotf4(vector float x, vector float y) -{ - vector unsigned int emask = spu_splats(0x7F800000u); - vector unsigned int mmask = spu_splats(0x007FFFFFu); - vector signed int bias = spu_splats(0x3F800000); - vector float inf = (vec_float4)spu_splats(0x7F800000); - vector float onef = spu_splats(1.0f); - vector float sbit = spu_splats(-0.0f); - vector float max, max_e, max_m; - vector float min, min_e, min_m; - vector unsigned int xgty; - vector float sum; - vector float result; - - /* Only need absolute values for this function */ - x = spu_andc(x, sbit); - y = spu_andc(y, sbit); - xgty = spu_cmpgt(x,y); - - max = spu_sel(y,x,xgty); - min = spu_sel(x,y,xgty); - - /* Extract exponents and mantissas */ - max_e = (vec_float4)spu_and((vec_uint4)max, emask); - max_m = (vec_float4)spu_and((vec_uint4)max, mmask); - min_e = (vec_float4)spu_and((vec_uint4)min, emask); - min_m = (vec_float4)spu_and((vec_uint4)min, mmask); - - /* Adjust the exponent of the smaller of the 2 input values by - * subtracting max_exp from min_exp. - */ - vec_int4 min_e_int = spu_sub((vec_int4)min_e, (vec_int4)max_e); - min_e = (vec_float4)spu_add(min_e_int, bias); - - /* If the new min exponent is too small, just set it to 0. It - * wouldn't contribute to the final result in either case. - */ - min_e = spu_sel(min_e, sbit, spu_cmpgt(sbit, min_e)); - - /* Combine new exponents with original mantissas */ - max = spu_or(onef, max_m); - min = spu_or(min_e, min_m); - - sum = _sqrtf4(spu_madd(max, max, spu_mul(min, min))); - sum = spu_mul(max_e, sum); - - /* Special case: x = +/- infinity */ - result = spu_sel(sum, inf, spu_cmpeq(x, inf)); - - return result; -} - -#endif /* _HYPOTF4_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/ilogb.h b/newlib/libm/machine/spu/headers/ilogb.h deleted file mode 100644 index c0699a19a..000000000 --- a/newlib/libm/machine/spu/headers/ilogb.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _ILOGB_H_ -#define _ILOGB_H_ 1 - -#include -#include "headers/vec_literal.h" -#include -#include - -/* ilogb returns the signed exponent in the floating-point - * input. Special numbers include: - * Input Output - * ===== ===================== - * INF FP_ILOGBNAN (INT_MAX) - * NAN FP_ILOGBNAN (INT_MAX) - * denorm exponent - leading zeros - * 0 FP_ILOGB0 (INT_MIN) - * else signed exponent - */ - -static __inline int _ilogb(double x) -{ - vec_uint4 v, exp, exp_0, mant, mask, count; - vec_uint4 flg_exp_0, flg_exp_max; - - mask = VEC_SPLAT_U32(0x7FF); - - /* Extract the exponent and mantissa. - */ - v = (vec_uint4)spu_promote(x, 0); - - exp = spu_and(spu_rlmask(v, -20), mask); - - mant = spu_and(v, VEC_LITERAL(vec_uint4, 0x000FFFFF, 0xFFFFFFFF, 0, 0)); - - /* Count the leading zeros in the mantissa for denorm handling - * and zero identification. - */ - count = spu_cntlz(mant); - count = spu_add(count, spu_and(spu_rlqwbyte(count, 4), spu_cmpeq(count, 32))); - - flg_exp_0 = spu_cmpeq(exp, 0); - flg_exp_max = spu_cmpeq(exp, mask); - - exp = spu_add(exp, -1023); - - /* Determine the exponent if the input is a denorm or zero. - */ - exp_0 = spu_sel(spu_sub(spu_add(exp, 12), count), VEC_SPLAT_U32(FP_ILOGB0), spu_cmpeq(count, 64)); - - exp = spu_sel(spu_sel(exp, VEC_SPLAT_U32(FP_ILOGBNAN), flg_exp_max), exp_0, flg_exp_0); - - return (spu_extract((vec_int4)(exp), 0)); -} -#endif /* _ILOGB_H_ */ diff --git a/newlib/libm/machine/spu/headers/ilogbf.h b/newlib/libm/machine/spu/headers/ilogbf.h deleted file mode 100644 index 5c591f04f..000000000 --- a/newlib/libm/machine/spu/headers/ilogbf.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _ILOGBF_H_ -#define _ILOGBF_H_ 1 - -#include -#include -#include -#include "headers/vec_literal.h" - -/* Single precision floats do not support infinities and NANs, and - * denorms are treated as zero. - */ -static __inline int _ilogbf(float x) -{ - vec_uint4 v, exp; - - v = (vec_uint4)spu_promote(x, 0); - exp = spu_and(spu_rlmask(v, -23), 0xFF); - exp = spu_sel(spu_add(exp, -127), VEC_SPLAT_U32(FP_ILOGB0), spu_cmpeq(exp, 0)); - return (spu_extract((vec_int4)(exp), 0)); -} -#endif /* _ILOGBF_H_ */ diff --git a/newlib/libm/machine/spu/headers/isnan.h b/newlib/libm/machine/spu/headers/isnan.h deleted file mode 100644 index ada7e6e8d..000000000 --- a/newlib/libm/machine/spu/headers/isnan.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/isnand2.h" - -static __inline int _isnan(double x) -{ - return spu_extract(_isnand2(spu_promote(x, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/isnand2.h b/newlib/libm/machine/spu/headers/isnand2.h deleted file mode 100644 index 7fb44bebe..000000000 --- a/newlib/libm/machine/spu/headers/isnand2.h +++ /dev/null @@ -1,114 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _ISNAND2_H_ -#define _ISNAND2_H_ 1 - -#include - -/* - * FUNCTION - * vector unsigned long long _isnand2(vector double x) - * - * DESCRIPTION - * The _isnand2 function returns a vector in which each element indicates - * if the corresponding element of x is not a number. (NaN) - * - * RETURNS - * The function _isnand2 returns an unsigned long long vector in which - * each element is defined as: - * - * - ULLONG_MAX if the element of x is NaN - * - 0 otherwise - * - */ -static __inline vector unsigned long long _isnand2(vector double x) -{ - -#ifndef __SPU_EDP__ - - vec_uint4 sign_mask = (vec_uint4) { 0x7FFFFFFF, 0xFFFFFFFF, 0x7FFFFFFF, 0xFFFFFFFF }; - vec_uint4 test_mask = (vec_uint4) { 0x7FF00000, 0x00000000, 0x7FF00000, 0x00000000 }; - vec_uchar16 hi_promote = (vec_uchar16) { 0, 1, 2, 3, 0, 1, 2, 3, 8, 9, 10, 11, 8, 9, 10, 11 }; - - // Remove the sign bits - vec_uint4 signless = spu_and((vec_uint4)x,sign_mask); - - // Check if the high word is equal to the max_exp - vec_uint4 x2 = spu_cmpeq(signless,test_mask); - - // This checks two things: - // 1) If the high word is greater than max_exp (indicates a NaN) - // 2) If the low word is non-zero (indicates a NaN in conjunction with an - // exp equal to max_exp) - vec_uint4 x1 = spu_cmpgt(signless,test_mask); - - // rotate the low word test of x1 into the high word slot, then and it - // with the high word of x2 (checking for #2 above) - vec_uint4 exp_and_lw = spu_and(spu_rlqwbyte(x1,4),x2); - - // All the goodies are in the high words, so if the high word of either x1 - // or exp_and_lw is set, then we have a NaN, so we "or" them together - vec_uint4 result = spu_or(x1,exp_and_lw); - - // And then promote the resulting high word to 64 bit length - result = spu_shuffle(result,result,hi_promote); - - return (vec_ullong2) result; - -#else - - return spu_testsv(x, SPU_SV_NAN); - -#endif /* __SPU_EDP__ */ -} - -#endif // _ISNAND2_H_ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/isnanf.h b/newlib/libm/machine/spu/headers/isnanf.h deleted file mode 100644 index 61b1703c9..000000000 --- a/newlib/libm/machine/spu/headers/isnanf.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/isnanf4.h" - -static __inline unsigned int _isnanf(float x) -{ - return spu_extract(_isnanf4(spu_promote(x, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/isnanf4.h b/newlib/libm/machine/spu/headers/isnanf4.h deleted file mode 100644 index 5c16b4cde..000000000 --- a/newlib/libm/machine/spu/headers/isnanf4.h +++ /dev/null @@ -1,78 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _ISNANF4_H_ -#define _ISNANF4_H_ 1 - -#include - -/* - * FUNCTION - * vector unsigned int _isnanf4(vector float x) - * - * DESCRIPTION - * The _isnanf4 function returns a vector in which each element indicates - * if the corresponding element of x is NaN. - * - * On the SPU, this function always returns 0, since NaNs are not - * supported. - * - * RETURNS - * UINT_MAX (0xFFFFFFFF) if the element of x is a NaN - * 0 (0x00000000) otherwise (always on the SPU) - * - */ -static __inline vector unsigned int _isnanf4(vector float __attribute__((__unused__))x) -{ - return spu_splats((unsigned int)0); -} - -#endif // _ISNANF4_H_ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/ldexp.h b/newlib/libm/machine/spu/headers/ldexp.h deleted file mode 100644 index 811059c1d..000000000 --- a/newlib/libm/machine/spu/headers/ldexp.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _LDEXP_H_ -#define _LDEXP_H_ 1 - -#include -#include "headers/vec_literal.h" - -/* ldexp computes x * 2^exp. This function variant computes the result - * and handles overflow, underflow, and denorms by breaking the problem - * into: - * exp = MAX(exp, -2044) - * exp = MIN(exp, 2046) - * e1 = exp / 2 - * e2 = exp - e1; - * x * 2^e1 * 2^e2 - */ -static __inline double _ldexp(double x, int exp) -{ - vec_int4 e, e1, e2; - vec_int4 min = VEC_SPLAT_S32(-2044); - vec_int4 max = VEC_SPLAT_S32(2046); - vec_uint4 cmp_min, cmp_max; - vec_uint4 shift = VEC_LITERAL(vec_uint4, 20, 32, 20, 32); - vec_double2 f1, f2; - vec_double2 in, out; - - in = spu_promote(x, 0); - e = spu_promote(exp, 0); - - /* Clamp the specified exponent to the range -2044 to 2046. - */ - cmp_min = spu_cmpgt(e, min); - cmp_max = spu_cmpgt(e, max); - e = spu_sel(min, e, cmp_min); - e = spu_sel(e, max, cmp_max); - - /* Generate the factors f1 = 2^e1 and f2 = 2^e2 - */ - e1 = spu_rlmaska(e, -1); - e2 = spu_sub(e, e1); - - f1 = (vec_double2)spu_sl(spu_add(e1, 1023), shift); - f2 = (vec_double2)spu_sl(spu_add(e2, 1023), shift); - - /* Compute the product x * 2^e1 * 2^e2 - */ - out = spu_mul(spu_mul(in, f1), f2); - - return (spu_extract(out, 0)); -} - -#endif /* _LDEXP_H_ */ diff --git a/newlib/libm/machine/spu/headers/ldexpd2.h b/newlib/libm/machine/spu/headers/ldexpd2.h deleted file mode 100644 index f00afceb2..000000000 --- a/newlib/libm/machine/spu/headers/ldexpd2.h +++ /dev/null @@ -1,114 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ - -#ifndef _LDEXPD2_H_ -#define _LDEXPD2_H_ 1 - -#include - -/* - * FUNCTION - * vector double _ldexpd2(vector double x, vector signed long long exp) - * - * DESCRIPTION - * The _ldexpd2 function Computes x * 2^exp for each of the two elements - * of x using the corresponding elements of exp. - * - */ -static __inline vector double _ldexpd2(vector double x, vector signed long long llexp) -{ - vec_uchar16 odd_to_even = ((vec_uchar16) { 4,5,6,7, 0x80,0x80,0x80,0x80, - 12,13,14,15, 0x80,0x80,0x80,0x80 }); - vec_uchar16 dup_even = ((vec_uchar16) { 0,1,2,3, 0,1,2,3, - 8,9,10,11, 8,9,10,11}); - vec_int4 exp; - vec_uint4 exphi; - vec_int4 e1, e2; - vec_int4 min = spu_splats(-2044); - vec_int4 max = spu_splats(2046); - vec_uint4 cmp_min, cmp_max; - vec_uint4 shift = (vec_uint4) { 20, 32, 20, 32 }; - vec_double2 f1, f2; - vec_double2 out; - - exp = (vec_int4)spu_shuffle(llexp, llexp, odd_to_even); - - exphi = (vec_uint4)spu_shuffle(llexp, llexp, dup_even); - - /* Clamp the specified exponent to the range -2044 to 2046. - */ - - cmp_min = spu_cmpgt(exp, min); - cmp_max = spu_cmpgt(exp, max); - exp = spu_sel(min, exp, cmp_min); - exp = spu_sel(exp, max, cmp_max); - - /* Generate the factors f1 = 2^e1 and f2 = 2^e2 - */ - e1 = spu_rlmaska(exp, -1); - e2 = spu_sub(exp, e1); - - f1 = (vec_double2)spu_sl(spu_add(e1, 1023), shift); - f2 = (vec_double2)spu_sl(spu_add(e2, 1023), shift); - - /* Compute the product x * 2^e1 * 2^e2 - */ - out = spu_mul(spu_mul(x, f1), f2); - - return (out); -} - -#endif /* _LDEXPD2_H_ */ -#endif /* __SPU__ */ - diff --git a/newlib/libm/machine/spu/headers/ldexpf.h b/newlib/libm/machine/spu/headers/ldexpf.h deleted file mode 100644 index f04f85345..000000000 --- a/newlib/libm/machine/spu/headers/ldexpf.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _LDEXPF_H_ -#define _LDEXPF_H_ 1 - -#include -#include "headers/vec_literal.h" - -/* ldexpf computes x * 2^exp. This function is computed without - * the assistence of any floating point operations and as such does - * not set any floating point exceptions. - */ -static __inline float _ldexpf(float x, int exp) -{ - vec_int4 x_exp; - vec_uint4 zero, overflow; - vec_uint4 exp_mask = VEC_SPLAT_U32(0x7F800000); - vec_float4 in, out; - - in = spu_promote(x, 0); - - /* Extract exponent from x. If the exponent is 0, then - * x is either 0 or a denorm and x*2^exp is a zero. - */ - x_exp = spu_and(spu_rlmask((vec_int4)in, -23), 0xFF); - - zero = spu_cmpeq(x_exp, 0); - - /* Compute the expected exponent and determine if the - * result is within range. - */ - x_exp = spu_add(spu_promote(exp, 0), x_exp); - - zero = spu_orc(zero, spu_cmpgt(x_exp, 0)); - - overflow = spu_rlmask(spu_cmpgt(x_exp, 255), -1); - - /* Merge the expect exponent with x's mantissa. Zero the - * result if underflow and force to max if overflow. - */ - out = spu_sel(in, (vec_float4)spu_rl(x_exp, 23), exp_mask); - out = spu_andc(out, (vec_float4)zero); - out = spu_or(out, (vec_float4)overflow); - - return (spu_extract(out, 0)); -} -#endif /* _LDEXPF_H_ */ diff --git a/newlib/libm/machine/spu/headers/ldexpf4.h b/newlib/libm/machine/spu/headers/ldexpf4.h deleted file mode 100644 index 88e13b32b..000000000 --- a/newlib/libm/machine/spu/headers/ldexpf4.h +++ /dev/null @@ -1,84 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ - -#ifndef _LDEXPF4_H_ -#define _LDEXPF4_H_ 1 - -#include -#include "scalbnf4.h" - -/* - * FUNCTION - * vector float _ldexpf4(vector float x, vector signed int exp) - * - * DESCRIPTION - * The _ldexpf4 function returns a vector containing each element of x - * multiplied by 2^exp computed efficiently. This function is computed - * without the assistance of any floating point operations and as such - * does not set any floating point exceptions. - * - * RETURNS - * - if the exponent of x is 0, then x is either 0 or a subnormal, - * and the result will be returned as 0. - * - if the result if underflows, it will be returned as 0. - * - if the result overflows, it will be returned as FLT_MAX. - * - */ -static __inline vector float _ldexpf4(vector float x, vector signed int exp) -{ - return _scalbnf4(x, exp); -} - -#endif /* _LDEXPF4_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/lgamma.h b/newlib/libm/machine/spu/headers/lgamma.h deleted file mode 100644 index 513e3ebed..000000000 --- a/newlib/libm/machine/spu/headers/lgamma.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/lgammad2.h" - -static __inline double _lgamma(double x) -{ - return spu_extract(_lgammad2(spu_promote(x, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/lgammad2.h b/newlib/libm/machine/spu/headers/lgammad2.h deleted file mode 100644 index 2644c770e..000000000 --- a/newlib/libm/machine/spu/headers/lgammad2.h +++ /dev/null @@ -1,330 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ - -#ifndef _LGAMMAD2_H_ -#define _LGAMMAD2_H_ 1 - -#include -#include "divd2.h" -#include "recipd2.h" -#include "logd2.h" -#include "sind2.h" -#include "truncd2.h" - - -/* - * FUNCTION - * vector double _lgammad2(vector double x) - Natural Log of Gamma Function - * - * DESCRIPTION - * _lgammad2 calculates the natural logarithm of the absolute value of the gamma - * function for the corresponding elements of the input vector. - * - * C99 Special Cases: - * lgamma(0) returns +infinite - * lgamma(1) returns +0 - * lgamma(2) returns +0 - * lgamma(negative integer) returns +infinite - * lgamma(+infinite) returns +infinite - * lgamma(-infinite) returns +infinite - * - * Other Cases: - * lgamma(Nan) returns Nan - * lgamma(Denorm) treated as lgamma(0) and returns +infinite - * - */ - -#define PI 3.1415926535897932384626433832795028841971693993751058209749445923078164 -#define HALFLOG2PI 9.1893853320467274178032973640561763986139747363778341281715154048276570E-1 - -#define EULER_MASCHERONI 0.5772156649015328606065 - -/* - * Zeta constants for Maclaurin approx. near zero - */ -#define ZETA_02_DIV_02 8.2246703342411321823620758332301E-1 -#define ZETA_03_DIV_03 -4.0068563438653142846657938717048E-1 -#define ZETA_04_DIV_04 2.7058080842778454787900092413529E-1 -#define ZETA_05_DIV_05 -2.0738555102867398526627309729141E-1 -#define ZETA_06_DIV_06 1.6955717699740818995241965496515E-1 - -/* - * More Maclaurin coefficients - */ -/* -#define ZETA_07_DIV_07 -1.4404989676884611811997107854997E-1 -#define ZETA_08_DIV_08 1.2550966952474304242233565481358E-1 -#define ZETA_09_DIV_09 -1.1133426586956469049087252991471E-1 -#define ZETA_10_DIV_10 1.0009945751278180853371459589003E-1 -#define ZETA_11_DIV_11 -9.0954017145829042232609298411497E-2 -#define ZETA_12_DIV_12 8.3353840546109004024886499837312E-2 -#define ZETA_13_DIV_13 -7.6932516411352191472827064348181E-2 -#define ZETA_14_DIV_14 7.1432946295361336059232753221795E-2 -#define ZETA_15_DIV_15 -6.6668705882420468032903448567376E-2 -#define ZETA_16_DIV_16 6.2500955141213040741983285717977E-2 -#define ZETA_17_DIV_17 -5.8823978658684582338957270605504E-2 -#define ZETA_18_DIV_18 5.5555767627403611102214247869146E-2 -#define ZETA_19_DIV_19 -5.2631679379616660733627666155673E-2 -#define ZETA_20_DIV_20 5.0000047698101693639805657601934E-2 - */ - -/* - * Coefficients for Stirling's Series for Lgamma() - */ -#define STIRLING_01 8.3333333333333333333333333333333333333333333333333333333333333333333333E-2 -#define STIRLING_02 -2.7777777777777777777777777777777777777777777777777777777777777777777778E-3 -#define STIRLING_03 7.9365079365079365079365079365079365079365079365079365079365079365079365E-4 -#define STIRLING_04 -5.9523809523809523809523809523809523809523809523809523809523809523809524E-4 -#define STIRLING_05 8.4175084175084175084175084175084175084175084175084175084175084175084175E-4 -#define STIRLING_06 -1.9175269175269175269175269175269175269175269175269175269175269175269175E-3 -#define STIRLING_07 6.4102564102564102564102564102564102564102564102564102564102564102564103E-3 -#define STIRLING_08 -2.9550653594771241830065359477124183006535947712418300653594771241830065E-2 -#define STIRLING_09 1.7964437236883057316493849001588939669435025472177174963552672531000704E-1 -#define STIRLING_10 -1.3924322169059011164274322169059011164274322169059011164274322169059011E0 -#define STIRLING_11 1.3402864044168391994478951000690131124913733609385783298826777087646653E1 -#define STIRLING_12 -1.5684828462600201730636513245208897382810426288687158252375643679991506E2 -#define STIRLING_13 2.1931033333333333333333333333333333333333333333333333333333333333333333E3 -#define STIRLING_14 -3.6108771253724989357173265219242230736483610046828437633035334184759472E4 -#define STIRLING_15 6.9147226885131306710839525077567346755333407168779805042318946657100161E5 -/* - * More Stirling's coefficients - */ -/* -#define STIRLING_16 -1.5238221539407416192283364958886780518659076533839342188488298545224541E7 -#define STIRLING_17 3.8290075139141414141414141414141414141414141414141414141414141414141414E8 -#define STIRLING_18 -1.0882266035784391089015149165525105374729434879810819660443720594096534E10 -#define STIRLING_19 3.4732028376500225225225225225225225225225225225225225225225225225225225E11 -#define STIRLING_20 -1.2369602142269274454251710349271324881080978641954251710349271324881081E13 -#define STIRLING_21 4.8878806479307933507581516251802290210847053890567382180703629532735764E14 -*/ - - -static __inline vector double _lgammad2(vector double x) -{ - vec_uchar16 dup_even = ((vec_uchar16) { 0,1,2,3, 0,1,2,3, 8, 9,10,11, 8, 9,10,11 }); - vec_uchar16 dup_odd = ((vec_uchar16) { 4,5,6,7, 4,5,6,7, 12,13,14,15, 12,13,14,15 }); - vec_uchar16 swap_word = ((vec_uchar16) { 4,5,6,7, 0,1,2,3, 12,13,14,15, 8, 9,10,11 }); - vec_double2 infinited = (vec_double2)spu_splats(0x7FF0000000000000ull); - vec_double2 zerod = spu_splats(0.0); - vec_double2 oned = spu_splats(1.0); - vec_double2 twod = spu_splats(2.0); - vec_double2 pi = spu_splats(PI); - vec_double2 sign_maskd = spu_splats(-0.0); - - /* This is where we switch from near zero approx. */ - vec_float4 zero_switch = spu_splats(0.001f); - vec_float4 shift_switch = spu_splats(6.0f); - - vec_float4 xf; - vec_double2 inv_x, inv_xsqu; - vec_double2 xtrunc, xstirling; - vec_double2 sum, xabs; - vec_uint4 xhigh, xlow, xthigh, xtlow; - vec_uint4 x1, isnaninf, isnposint, iszero, isint, isneg, isshifted, is1, is2; - vec_double2 result, stresult, shresult, mresult, nresult; - - - /* Force Denorms to 0 */ - x = spu_add(x, zerod); - - xabs = spu_andc(x, sign_maskd); - xf = spu_roundtf(xabs); - xf = spu_shuffle(xf, xf, dup_even); - - - /* - * For 0 < x <= 0.001. - * Approximation Near Zero - * - * Use Maclaurin Expansion of lgamma() - * - * lgamma(z) = -ln(z) - z * EulerMascheroni + Sum[(-1)^n * z^n * Zeta(n)/n] - */ - mresult = spu_madd(xabs, spu_splats(ZETA_06_DIV_06), spu_splats(ZETA_05_DIV_05)); - mresult = spu_madd(xabs, mresult, spu_splats(ZETA_04_DIV_04)); - mresult = spu_madd(xabs, mresult, spu_splats(ZETA_03_DIV_03)); - mresult = spu_madd(xabs, mresult, spu_splats(ZETA_02_DIV_02)); - mresult = spu_mul(xabs, spu_mul(xabs, mresult)); - mresult = spu_sub(mresult, spu_add(_logd2(xabs), spu_mul(xabs, spu_splats(EULER_MASCHERONI)))); - - - /* - * For 0.001 < x <= 6.0, we are going to push value - * out to an area where Stirling's approximation is - * accurate. Let's use a constant of 6. - * - * Use the recurrence relation: - * lgamma(x + 1) = ln(x) + lgamma(x) - * - * Note that we shift x here, before Stirling's calculation, - * then after Stirling's, we adjust the result. - * - */ - - isshifted = spu_cmpgt(shift_switch, xf); - xstirling = spu_sel(xabs, spu_add(xabs, spu_splats(6.0)), (vec_ullong2)isshifted); - inv_x = _recipd2(xstirling); - inv_xsqu = spu_mul(inv_x, inv_x); - - /* - * For 6.0 < x < infinite - * - * Use Stirling's Series. - * - * 1 1 1 1 1 - * lgamma(x) = --- ln (2*pi) + (z - ---) ln(x) - x + --- - ----- + ------ ... - * 2 2 12x 360x^3 1260x^5 - * - * Taking 10 terms of the sum gives good results for x > 6.0 - * - */ - sum = spu_madd(inv_xsqu, spu_splats(STIRLING_15), spu_splats(STIRLING_14)); - sum = spu_madd(sum, inv_xsqu, spu_splats(STIRLING_13)); - sum = spu_madd(sum, inv_xsqu, spu_splats(STIRLING_12)); - sum = spu_madd(sum, inv_xsqu, spu_splats(STIRLING_11)); - sum = spu_madd(sum, inv_xsqu, spu_splats(STIRLING_10)); - sum = spu_madd(sum, inv_xsqu, spu_splats(STIRLING_09)); - sum = spu_madd(sum, inv_xsqu, spu_splats(STIRLING_08)); - sum = spu_madd(sum, inv_xsqu, spu_splats(STIRLING_07)); - sum = spu_madd(sum, inv_xsqu, spu_splats(STIRLING_06)); - sum = spu_madd(sum, inv_xsqu, spu_splats(STIRLING_05)); - sum = spu_madd(sum, inv_xsqu, spu_splats(STIRLING_04)); - sum = spu_madd(sum, inv_xsqu, spu_splats(STIRLING_03)); - sum = spu_madd(sum, inv_xsqu, spu_splats(STIRLING_02)); - sum = spu_madd(sum, inv_xsqu, spu_splats(STIRLING_01)); - sum = spu_mul(sum, inv_x); - - stresult = spu_madd(spu_sub(xstirling, spu_splats(0.5)), _logd2(xstirling), spu_splats(HALFLOG2PI)); - stresult = spu_sub(stresult, xstirling); - stresult = spu_add(stresult, sum); - - /* - * Adjust result if we shifted x into Stirling range. - * - * lgamma(x) = lgamma(x + n) - ln(x(x+1)(x+2)...(x+n-1) - * - */ - shresult = spu_mul(xabs, spu_add(xabs, spu_splats(1.0))); - shresult = spu_mul(shresult, spu_add(xabs, spu_splats(2.0))); - shresult = spu_mul(shresult, spu_add(xabs, spu_splats(3.0))); - shresult = spu_mul(shresult, spu_add(xabs, spu_splats(4.0))); - shresult = spu_mul(shresult, spu_add(xabs, spu_splats(5.0))); - shresult = _logd2(shresult); - shresult = spu_sub(stresult, shresult); - stresult = spu_sel(stresult, shresult, (vec_ullong2)isshifted); - - - /* - * Select either Maclaurin or Stirling result before Negative X calc. - */ - xf = spu_shuffle(xf, xf, dup_even); - vec_uint4 useStirlings = spu_cmpgt(xf, zero_switch); - result = spu_sel(mresult, stresult, (vec_ullong2)useStirlings); - - - /* - * Approximation for Negative X - * - * Use reflection relation - * - * gamma(x) * gamma(-x) = -pi/(x sin(pi x)) - * - * lgamma(x) = log(pi/(-x sin(pi x))) - lgamma(-x) - * - */ - nresult = spu_mul(x, _sind2(spu_mul(x, pi))); - nresult = spu_andc(nresult, sign_maskd); - nresult = _logd2(_divd2(pi, nresult)); - nresult = spu_sub(nresult, result); - - - /* - * Select between the negative or positive x approximations. - */ - isneg = (vec_uint4)spu_shuffle(x, x, dup_even); - isneg = spu_rlmaska(isneg, -32); - result = spu_sel(result, nresult, (vec_ullong2)isneg); - - - /* - * Finally, special cases/errors. - */ - xhigh = (vec_uint4)spu_shuffle(xabs, xabs, dup_even); - xlow = (vec_uint4)spu_shuffle(xabs, xabs, dup_odd); - - /* x = zero, return infinite */ - x1 = spu_or(xhigh, xlow); - iszero = spu_cmpeq(x1, 0); - - /* x = negative integer, return infinite */ - xtrunc = _truncd2(xabs); - xthigh = (vec_uint4)spu_shuffle(xtrunc, xtrunc, dup_even); - xtlow = (vec_uint4)spu_shuffle(xtrunc, xtrunc, dup_odd); - isint = spu_and(spu_cmpeq(xthigh, xhigh), spu_cmpeq(xtlow, xlow)); - isnposint = spu_or(spu_and(isint, isneg), iszero); - result = spu_sel(result, infinited, (vec_ullong2)isnposint); - - /* x = 1.0 or 2.0, return 0.0 */ - is1 = spu_cmpeq((vec_uint4)x, (vec_uint4)oned); - is1 = spu_and(is1, spu_shuffle(is1, is1, swap_word)); - is2 = spu_cmpeq((vec_uint4)x, (vec_uint4)twod); - is2 = spu_and(is2, spu_shuffle(is2, is2, swap_word)); - result = spu_sel(result, zerod, (vec_ullong2)spu_or(is1,is2)); - - /* x = +/- infinite or nan, return |x| */ - isnaninf = spu_cmpgt(xhigh, 0x7FEFFFFF); - result = spu_sel(result, xabs, (vec_ullong2)isnaninf); - - return result; -} - -#endif /* _LGAMMAD2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/lgammaf.h b/newlib/libm/machine/spu/headers/lgammaf.h deleted file mode 100644 index cf19ab383..000000000 --- a/newlib/libm/machine/spu/headers/lgammaf.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/lgammaf4.h" - -static __inline float _lgammaf(float x) -{ - return spu_extract(_lgammaf4(spu_promote(x, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/lgammaf4.h b/newlib/libm/machine/spu/headers/lgammaf4.h deleted file mode 100644 index 956a0e1c4..000000000 --- a/newlib/libm/machine/spu/headers/lgammaf4.h +++ /dev/null @@ -1,232 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ - -#ifndef _LGAMMAF4_H_ -#define _LGAMMAF4_H_ 1 - -#include -#include "lgammad2.h" -#include "recipf4.h" -#include "logf4.h" -#include "sinf4.h" -#include "truncf4.h" - -/* - * FUNCTION - * vector float _lgammaf4(vector float x) - Natural Log of Gamma Function - * - * DESCRIPTION - * _lgammaf4 calculates the natural logarithm of the absolute value of the gamma - * function for the corresponding elements of the input vector. - * - * C99 Special Cases: - * lgamma(0) returns +infinite - * lgamma(1) returns +0 - * lgamma(2) returns +0 - * lgamma(negative integer) returns +infinite - * lgamma(+infinite) returns +infinite - * lgamma(-infinite) returns +infinite - * - * Other Cases: - * lgamma(Nan) returns Nan - * lgamma(Denorm) treated as lgamma(0) and returns +infinite - * - */ - - -static __inline vector float _lgammaf4(vector float x) -{ - vec_float4 inff = (vec_float4)spu_splats(0x7F800000); - vec_float4 zerof = spu_splats(0.0f); - vec_float4 pi = spu_splats((float)PI); - vec_float4 sign_maskf = spu_splats(-0.0f); - - vector unsigned int gt0; - - /* This is where we switch from near zero approx. */ - vec_float4 mac_switch = spu_splats(0.16f); - vec_float4 shift_switch = spu_splats(6.0f); - - vec_float4 inv_x, inv_xsqu; - vec_float4 xtrunc, xstirling; - vec_float4 sum, xabs; - vec_uint4 isnaninf, isshifted; - vec_float4 result, stresult, shresult, mresult, nresult; - - - /* Force Denorms to 0 */ - x = spu_add(x, zerof); - - xabs = spu_andc(x, sign_maskf); - - gt0 = spu_cmpgt(x, zerof); - xtrunc = _truncf4(x); - - /* - * For 0 < x <= 0.16. - * Approximation Near Zero - * - * Use Maclaurin Expansion of lgamma() - * - * lgamma(z) = -ln(z) - z * EulerMascheroni + Sum[(-1)^n * z^n * Zeta(n)/n] - */ - mresult = spu_madd(xabs, spu_splats((float)ZETA_06_DIV_06), spu_splats((float)ZETA_05_DIV_05)); - mresult = spu_madd(xabs, mresult, spu_splats((float)ZETA_04_DIV_04)); - mresult = spu_madd(xabs, mresult, spu_splats((float)ZETA_03_DIV_03)); - mresult = spu_madd(xabs, mresult, spu_splats((float)ZETA_02_DIV_02)); - mresult = spu_mul(xabs, spu_mul(xabs, mresult)); - mresult = spu_sub(mresult, spu_add(_logf4(xabs), spu_mul(xabs, spu_splats((float)EULER_MASCHERONI)))); - - - /* - * For 0.16 < x <= 6.0, we are going to push value - * out to an area where Stirling's approximation is - * accurate. Let's use a constant of 6. - * - * Use the recurrence relation: - * lgamma(x + 1) = ln(x) + lgamma(x) - * - * Note that we shift x here, before Stirling's calculation, - * then after Stirling's, we adjust the result. - * - */ - - isshifted = spu_cmpgt(shift_switch, x); - xstirling = spu_sel(xabs, spu_add(xabs, spu_splats(6.0f)), isshifted); - inv_x = _recipf4(xstirling); - inv_xsqu = spu_mul(inv_x, inv_x); - - /* - * For 6.0 < x < infinite - * - * Use Stirling's Series. - * - * 1 1 1 1 1 - * lgamma(x) = --- ln (2*pi) + (z - ---) ln(x) - x + --- - ----- + ------ ... - * 2 2 12x 360x^3 1260x^5 - * - * - */ - sum = spu_madd(inv_xsqu, spu_splats((float)STIRLING_10), spu_splats((float)STIRLING_09)); - sum = spu_madd(sum, inv_xsqu, spu_splats((float)STIRLING_08)); - sum = spu_madd(sum, inv_xsqu, spu_splats((float)STIRLING_07)); - sum = spu_madd(sum, inv_xsqu, spu_splats((float)STIRLING_06)); - sum = spu_madd(sum, inv_xsqu, spu_splats((float)STIRLING_05)); - sum = spu_madd(sum, inv_xsqu, spu_splats((float)STIRLING_04)); - sum = spu_madd(sum, inv_xsqu, spu_splats((float)STIRLING_03)); - sum = spu_madd(sum, inv_xsqu, spu_splats((float)STIRLING_02)); - sum = spu_madd(sum, inv_xsqu, spu_splats((float)STIRLING_01)); - sum = spu_mul(sum, inv_x); - - stresult = spu_madd(spu_sub(xstirling, spu_splats(0.5f)), _logf4(xstirling), spu_splats((float)HALFLOG2PI)); - stresult = spu_sub(stresult, xstirling); - stresult = spu_add(stresult, sum); - - /* - * Adjust result if we shifted x into Stirling range. - * - * lgamma(x) = lgamma(x + n) - ln(x(x+1)(x+2)...(x+n-1) - * - */ - shresult = spu_mul(xabs, spu_add(xabs, spu_splats(1.0f))); - shresult = spu_mul(shresult, spu_add(xabs, spu_splats(2.0f))); - shresult = spu_mul(shresult, spu_add(xabs, spu_splats(3.0f))); - shresult = spu_mul(shresult, spu_add(xabs, spu_splats(4.0f))); - shresult = spu_mul(shresult, spu_add(xabs, spu_splats(5.0f))); - shresult = _logf4(shresult); - shresult = spu_sub(stresult, shresult); - stresult = spu_sel(stresult, shresult, isshifted); - - - /* - * Select either Maclaurin or Stirling result before Negative X calc. - */ - vec_uint4 useStirlings = spu_cmpgt(xabs, mac_switch); - result = spu_sel(mresult, stresult, useStirlings); - - /* - * Approximation for Negative X - * - * Use reflection relation: - * - * gamma(x) * gamma(-x) = -pi/(x sin(pi x)) - * - * lgamma(x) = log(pi/(-x sin(pi x))) - lgamma(-x) - * - */ - nresult = spu_mul(x, _sinf4(spu_mul(x, pi))); - nresult = spu_andc(nresult, sign_maskf); - nresult = spu_sub(_logf4(pi), spu_add(result, _logf4(nresult))); - - - /* - * Select between the negative or positive x approximations. - */ - result = spu_sel(nresult, result, gt0); - - /* - * Finally, special cases/errors. - */ - - /* - * x = non-positive integer, return infinity. - */ - result = spu_sel(result, inff, spu_andc(spu_cmpeq(x, xtrunc), gt0)); - - /* x = +/- infinite or nan, return |x| */ - isnaninf = spu_cmpgt((vec_uint4)xabs, 0x7FEFFFFF); - result = spu_sel(result, xabs, isnaninf); - - return result; -} - -#endif /* _LGAMMAF4_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/llrint.h b/newlib/libm/machine/spu/headers/llrint.h deleted file mode 100644 index 656322255..000000000 --- a/newlib/libm/machine/spu/headers/llrint.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _LLRINT_H_ -#define _LLRINT_H_ 1 - -#include -#include "headers/vec_literal.h" - -static __inline long long int _llrint(double x) -{ - int shift; - vec_int4 exp; - vec_uint4 mant, sign, mask, borrow; - vec_double2 in, bias; - - in = spu_promote(x, 0); - - /* Round the input according to the current rounding mode. - */ - bias = spu_sel((vec_double2)(VEC_SPLAT_U64(0x4330000000000000ULL)), in, - VEC_SPLAT_U64(0x8000000000000000ULL)); - mant = (vec_uint4)(spu_sub(spu_add(in, bias), bias)); - - /* Determine how many bits to shift the mantissa to correctly - * align it into long long element 0. - */ - exp = spu_and(spu_rlmask((vec_int4)mant, -20), 0x7FF); - exp = spu_add(exp, -1011); - shift = spu_extract(exp, 0); - - mask = spu_cmpgt(exp, 0); - mask = (vec_uint4)spu_maskw(spu_extract(mask, 0)); - - /* Algn mantissa bits - */ - mant = spu_sel(spu_rlmaskqwbyte(mant, -8), VEC_SPLAT_U32(0x00100000), - VEC_LITERAL(vec_uint4, 0,0,0xFFF00000,0)); - - mant = spu_and(spu_slqwbytebc(spu_slqw(mant, shift), shift), mask); - - /* Compute the two's complement of the mantissa if the - * input is negative. - */ - sign = spu_maskw(spu_extract(spu_rlmaska((vec_int4)in, -31), 0)); - - mant = spu_xor(mant, sign); - borrow = spu_genb(mant, sign); - borrow = spu_shuffle(borrow, borrow, - VEC_LITERAL(vec_uchar16, 4,5,6,7, 192,192,192,192, - 4,5,6,7, 192,192,192,192)); - mant = spu_subx(mant, sign, borrow); - - return (spu_extract((vec_llong2)(mant), 0)); -} -#endif /* _LLRINT_H_ */ diff --git a/newlib/libm/machine/spu/headers/llrintf.h b/newlib/libm/machine/spu/headers/llrintf.h deleted file mode 100644 index 76b6d70ef..000000000 --- a/newlib/libm/machine/spu/headers/llrintf.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _LLRINTF_H_ -#define _LLRINTF_H_ 1 - -#include -#include "headers/vec_literal.h" - -static __inline long long int _llrintf(float x) -{ - int shift; - vec_int4 exp; - vec_uint4 mant, sign, borrow; - vec_float4 in; - - in = spu_promote(x, 0); - - /* Place mantissa bits (including implied most signficant - * bit) into the most significant bits of element 3. Elements - * 0, 1, and 2 are zeroed. - */ - mant = spu_sel(spu_rlmaskqwbyte((vec_uint4)in, -11), - VEC_SPLAT_U32(0x80000000), - VEC_LITERAL(vec_uint4, 0,0,0xFF,0x800000FF)); - - /* Determine how many bits to shift the mantissa to correctly - * align it into long long element 0. - */ - exp = spu_and(spu_rlmask((vec_int4)in, -23), 0xFF); - shift = spu_extract(spu_add(exp, -94), 0); - - /* Algn mantissa bits - */ - mant = spu_slqwbytebc(spu_slqw(mant, shift), shift); - - /* Compute the two's complement of the mantissa if the - * input is negative. - */ - sign = spu_maskw(spu_extract(spu_rlmaska((vec_int4)in, -31), 0)); - - mant = spu_xor(mant, sign); - borrow = spu_genb(mant, sign); - borrow = spu_shuffle(borrow, borrow, - VEC_LITERAL(vec_uchar16, 4,5,6,7, 192,192,192,192, - 4,5,6,7, 192,192,192,192)); - mant = spu_subx(mant, sign, borrow); - - return (spu_extract((vec_llong2)(mant), 0)); -} -#endif /* _LLRINTF_H_ */ diff --git a/newlib/libm/machine/spu/headers/llround.h b/newlib/libm/machine/spu/headers/llround.h deleted file mode 100644 index 04969503b..000000000 --- a/newlib/libm/machine/spu/headers/llround.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _LLROUND_H_ -#define _LLROUND_H_ 1 - -#include -#include "headers/vec_literal.h" - -static __inline long long int _llround(double x) -{ - int shift; - vec_int4 exp; - vec_uint4 mant, sign, mask, borrow, addend; - vec_double2 in; - - in = spu_promote(x, 0); - - /* Determine how many bits to shift the mantissa to correctly - * align it into long long element 0. - */ - exp = spu_and(spu_rlmask((vec_int4)in, -20), 0x7FF); - exp = spu_add(exp, -1011); - shift = spu_extract(exp, 0); - - mask = spu_cmpgt(exp, 0); - mask = (vec_uint4)spu_maskw(spu_extract(mask, 0)); - - /* Algn mantissa bits - */ - mant = spu_sel(spu_rlmaskqwbyte((vec_uint4)in, -8), VEC_SPLAT_U32(0x00100000), - VEC_LITERAL(vec_uint4, 0,0,0xFFF00000,0)); - - mant = spu_and(spu_slqwbytebc(spu_slqw(mant, shift), shift), mask); - - /* Perform round by adding 1 if the fraction bits are - * greater than or equal to .5 - */ - addend = spu_and(spu_rlqw(mant, 1), VEC_LITERAL(vec_uint4, 0,1,0,0)); - mant = spu_addx(mant, addend, spu_rlqwbyte(spu_genc(mant, addend), 4)); - - /* Compute the two's complement of the mantissa if the - * input is negative. - */ - sign = spu_maskw(spu_extract(spu_rlmaska((vec_int4)in, -31), 0)); - - mant = spu_xor(mant, sign); - borrow = spu_genb(mant, sign); - borrow = spu_shuffle(borrow, borrow, - VEC_LITERAL(vec_uchar16, 4,5,6,7, 192,192,192,192, - 4,5,6,7, 192,192,192,192)); - mant = spu_subx(mant, sign, borrow); - - return (spu_extract((vec_llong2)(mant), 0)); -} -#endif /* _LLROUND_H_ */ diff --git a/newlib/libm/machine/spu/headers/llroundf.h b/newlib/libm/machine/spu/headers/llroundf.h deleted file mode 100644 index cfdebba2a..000000000 --- a/newlib/libm/machine/spu/headers/llroundf.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _LLROUNDF_H_ -#define _LLROUNDF_H_ 1 - -#include -#include "headers/vec_literal.h" - -static __inline long long int _llroundf(float x) -{ - int shift; - vec_int4 exp; - vec_uint4 mant, sign, borrow; - vec_float4 in; - - in = spu_promote(x, 0); - - /* Place mantissa bits (including implied most signficant - * bit) into the most significant bits of element 3. Elements - * 0, 1, and 2 are zeroed. - */ - mant = spu_sel(spu_rlmaskqwbyte((vec_uint4)in, -11), - VEC_SPLAT_U32(0x80000000), - VEC_LITERAL(vec_uint4, 0,0,0xFF,0x800000FF)); - - /* Determine how many bits to shift the mantissa to correctly - * align it into long long element 0. - */ - exp = spu_and(spu_rlmask((vec_int4)in, -23), 0xFF); - shift = spu_extract(spu_add(exp, -94), 0); - - /* Algn mantissa bits - */ - mant = spu_slqwbytebc(spu_slqw(mant, shift), shift); - - /* Perform round by adding 1 if the fraction bits are - * greater than or equal to .5 - */ - mant = spu_add(mant, spu_and(spu_rlqw(mant, 1), VEC_LITERAL(vec_uint4, 0,1,0,0))); - - /* Compute the two's complement of the mantissa if the - * input is negative. - */ - sign = spu_maskw(spu_extract(spu_rlmaska((vec_int4)in, -31), 0)); - - mant = spu_xor(mant, sign); - borrow = spu_genb(mant, sign); - - borrow = spu_shuffle(borrow, borrow, - VEC_LITERAL(vec_uchar16, 4,5,6,7, 192,192,192,192, - 4,5,6,7, 192,192,192,192)); - mant = spu_subx(mant, sign, borrow); - - return (spu_extract((vec_llong2)(mant), 0)); -} - -#endif /* _LLROUNDF_H_ */ diff --git a/newlib/libm/machine/spu/headers/log.h b/newlib/libm/machine/spu/headers/log.h deleted file mode 100644 index 9bb5e3bff..000000000 --- a/newlib/libm/machine/spu/headers/log.h +++ /dev/null @@ -1,16 +0,0 @@ -#include "headers/logd2.h" -#include "headers/dom_chkd_less_than.h" - -static __inline double _log(double x) -{ - double res; - vector double vx; - vector double vc = { 0.0, 0.0 }; - - vx = spu_promote(x, 0); - res = spu_extract(_logd2(vx), 0); -#ifndef _IEEE_LIBM - dom_chkd_less_than(vx, vc); -#endif - return res; -} diff --git a/newlib/libm/machine/spu/headers/log10.h b/newlib/libm/machine/spu/headers/log10.h deleted file mode 100644 index c3c6f9f80..000000000 --- a/newlib/libm/machine/spu/headers/log10.h +++ /dev/null @@ -1,16 +0,0 @@ -#include "headers/log10d2.h" -#include "headers/dom_chkd_less_than.h" - -static __inline double _log10(double x) -{ - double res; - vector double vx; - vector double vc = { 0.0, 0.0 }; - - vx = spu_promote(x, 0); - res = spu_extract(_log10d2(vx), 0); -#ifndef _IEEE_LIBM - dom_chkd_less_than(vx, vc); -#endif - return res; -} diff --git a/newlib/libm/machine/spu/headers/log10d2.h b/newlib/libm/machine/spu/headers/log10d2.h deleted file mode 100644 index f8234183c..000000000 --- a/newlib/libm/machine/spu/headers/log10d2.h +++ /dev/null @@ -1,79 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _LOG10D2_H_ -#define _LOG10D2_H_ 1 - -#include - - -#include "log2d2.h" - -/* - * FUNCTION - * vector double _log10d2(vector double x) - * - * DESCRIPTION - * _log10d2 computes log (base 10) for each of the double word - * elements the input vector x. log10_v - * is computed using log2d2 as follows: - * - * log10d2(x) = log2d2(x) / log2d2(10); - */ -static __inline vector double _log10d2(vector double x) -{ - return (spu_mul(_log2d2(x), spu_splats(0.301029995663981195213))); -} - -#endif /* _LOG10D2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/log10f.h b/newlib/libm/machine/spu/headers/log10f.h deleted file mode 100644 index 202cb7c0d..000000000 --- a/newlib/libm/machine/spu/headers/log10f.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _LOG10F_H_ -#define _LOG10F_H_ 1 - -#include "log2f.h" - -/* - * FUNCTION - * float _log10f(float x) - * - * DESCRIPTION - * _log10f computes log (base 10) of the input value x. log10 - * is computed using log2 as follows: - * - * log10f(x) = log2(x) / log2(10); - */ - -static __inline float _log10f(float x) -{ - return (_log2f(x) * 0.30102999566398f); -} - -#endif /* _LOG10F_H_ */ diff --git a/newlib/libm/machine/spu/headers/log1p.h b/newlib/libm/machine/spu/headers/log1p.h deleted file mode 100644 index 758be8d37..000000000 --- a/newlib/libm/machine/spu/headers/log1p.h +++ /dev/null @@ -1,16 +0,0 @@ -#include "headers/log1pd2.h" -#include "headers/dom_chkd_less_than.h" - -static __inline double _log1p(double x) -{ - double res; - vector double vx; - vector double vc = { -1.0, -1.0 }; - - vx = spu_promote(x, 0); - res = spu_extract(_log1pd2(vx), 0); -#ifndef _IEEE_LIBM - dom_chkd_less_than(vx, vc); -#endif - return res; -} diff --git a/newlib/libm/machine/spu/headers/log1pd2.h b/newlib/libm/machine/spu/headers/log1pd2.h deleted file mode 100644 index 0433f37b8..000000000 --- a/newlib/libm/machine/spu/headers/log1pd2.h +++ /dev/null @@ -1,137 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ - -#ifdef __SPU__ -#ifndef _LOG1PD2_H_ -#define _LOG1PD2_H_ 1 - -#include -#include "simdmath.h" - -#include "logd2.h" -#include "divd2.h" - - - -#define LOG1PD2_P0 0.0000000000000000000000000e+00 -#define LOG1PD2_P1 1.0000000000000000000000000e+00 -#define LOG1PD2_P2 2.3771612265431403265836252e+00 -#define LOG1PD2_P3 2.0034423569559494104908026e+00 -#define LOG1PD2_P4 7.1309327316770110272159400e-01 -#define LOG1PD2_P5 9.8219761968547217301228613e-02 -#define LOG1PD2_P6 3.4385125174546914139650511e-03 - -#define LOG1PD2_Q0 1.0000000000000000000000000e+00 -#define LOG1PD2_Q1 2.8771612265431403265836252e+00 -#define LOG1PD2_Q2 3.1086896368941925317130881e+00 -#define LOG1PD2_Q3 1.5583843494335058998956356e+00 -#define LOG1PD2_Q4 3.6047236436186669283898709e-01 -#define LOG1PD2_Q5 3.2620075387969869884496887e-02 -#define LOG1PD2_Q6 6.8047193336239690346356479e-04 - - -/* - * FUNCTION - * vector double _log1pd2(vector double x) - * - * DESCRIPTION - * The function _log1pd2 computes the natural logarithm of x + 1 - * for each of the double word elements of x. - * - */ - -static __inline vector double _log1pd2(vector double x) -{ - vector double oned = spu_splats(1.0); - vector double rangehi = spu_splats(0.35); - vector double rangelo = spu_splats(0.0); - vector unsigned long long use_log; - vector double pr, qr; - vector double eresult; - vector double rresult; - vector double result; - - /* Compiler Bug. Replace xbug with x when spu_cmp*() doesn't - * modify it's arguments! */ - volatile vector double xbug = x; - use_log = spu_or(spu_cmpgt(xbug, rangehi), spu_cmpgt(rangelo, xbug)); - - /* - * Calculate directly using log(x+1) - */ - eresult = _logd2(spu_add(x, oned)); - - /* - * For x in [0.0,0.35], use a rational approximation. - */ - pr = spu_madd(x, spu_splats(LOG1PD2_P6), spu_splats(LOG1PD2_P5)); - qr = spu_madd(x, spu_splats(LOG1PD2_Q6), spu_splats(LOG1PD2_Q5)); - pr = spu_madd(pr, x, spu_splats(LOG1PD2_P4)); - qr = spu_madd(qr, x, spu_splats(LOG1PD2_Q4)); - pr = spu_madd(pr, x, spu_splats(LOG1PD2_P3)); - qr = spu_madd(qr, x, spu_splats(LOG1PD2_Q3)); - pr = spu_madd(pr, x, spu_splats(LOG1PD2_P2)); - qr = spu_madd(qr, x, spu_splats(LOG1PD2_Q2)); - pr = spu_madd(pr, x, spu_splats(LOG1PD2_P1)); - qr = spu_madd(qr, x, spu_splats(LOG1PD2_Q1)); - pr = spu_madd(pr, x, spu_splats(LOG1PD2_P0)); - qr = spu_madd(qr, x, spu_splats(LOG1PD2_Q0)); - rresult = _divd2(pr, qr); - - /* - * Select either direct calculation or rational approximation. - */ - result = spu_sel(rresult, eresult, use_log); - - return result; -} - -#endif /* _LOG1PD2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/log1pf.h b/newlib/libm/machine/spu/headers/log1pf.h deleted file mode 100644 index b2af48669..000000000 --- a/newlib/libm/machine/spu/headers/log1pf.h +++ /dev/null @@ -1,16 +0,0 @@ -#include "headers/log1pf4.h" -#include "headers/dom_chkf_less_than.h" - -static __inline float _log1pf(float x) -{ - float res; - vector float vx; - vector float vc = { -1.0, -1.0, -1.0, -1.0 }; - - vx = spu_promote(x, 0); - res = spu_extract(_log1pf4(vx), 0); -#ifndef _IEEE_LIBM - dom_chkf_less_than(vx, vc); -#endif - return res; -} diff --git a/newlib/libm/machine/spu/headers/log1pf4.h b/newlib/libm/machine/spu/headers/log1pf4.h deleted file mode 100644 index 376aaaa72..000000000 --- a/newlib/libm/machine/spu/headers/log1pf4.h +++ /dev/null @@ -1,124 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ - -#ifdef __SPU__ -#ifndef _LOG1PF4_H_ -#define _LOG1PF4_H_ 1 - -#include -#include "simdmath.h" - -#include "logf4.h" -#include "divf4.h" - -/* - * FUNCTION - * vector float _log1pf4(vector float x) - * - * DESCRIPTION - * The function _log1pf4 computes the natural logarithm of x + 1 - * for each of the float word elements of x. - * - * - */ - -#define LOG1PF4_P0 0.0000000000000000000000000e+00f -#define LOG1PF4_P1 1.0000000000000000000000000e+00f -#define LOG1PF4_P2 1.4220868022897381610647471e+00f -#define LOG1PF4_P3 5.4254553902256308361984338e-01f -#define LOG1PF4_P4 4.5971908823142115796400731e-02f - -#define LOG1PF4_Q0 1.0000000000000000000000000e+00f -#define LOG1PF4_Q1 1.9220868007537357247116461e+00f -#define LOG1PF4_Q2 1.1702556461286610645089468e+00f -#define LOG1PF4_Q3 2.4040413392943396631018516e-01f -#define LOG1PF4_Q4 1.0637426466449625625521058e-02f - - -static __inline vector float _log1pf4(vector float x) -{ - vector float onef = spu_splats(1.0f); - vector float range = spu_splats(0.35f); - vector unsigned int use_log; - vector float pr, qr; - vector float eresult; - vector float rresult; - vector float result; - - use_log = spu_cmpabsgt(x, range); - - /* - * Calculate directly using log(x+1) - */ - eresult = _logf4(spu_add(x, onef)); - - /* - * For x in [-0.35,0.35], use a rational approximation. - */ - pr = spu_madd(x, spu_splats((float)LOG1PF4_P4), spu_splats((float)LOG1PF4_P3)); - qr = spu_madd(x, spu_splats((float)LOG1PF4_Q4), spu_splats((float)LOG1PF4_Q3)); - pr = spu_madd(pr, x, spu_splats((float)LOG1PF4_P2)); - qr = spu_madd(qr, x, spu_splats((float)LOG1PF4_Q2)); - pr = spu_madd(pr, x, spu_splats((float)LOG1PF4_P1)); - qr = spu_madd(qr, x, spu_splats((float)LOG1PF4_Q1)); - pr = spu_madd(pr, x, spu_splats((float)LOG1PF4_P0)); - qr = spu_madd(qr, x, spu_splats((float)LOG1PF4_Q0)); - rresult = _divf4(pr, qr); - - /* - * Select either direct calculation or rational approximation. - */ - result = spu_sel(rresult, eresult, use_log); - - return result; -} - -#endif /* _LOG1PF4_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/log2.h b/newlib/libm/machine/spu/headers/log2.h deleted file mode 100644 index 696bf9fae..000000000 --- a/newlib/libm/machine/spu/headers/log2.h +++ /dev/null @@ -1,16 +0,0 @@ -#include "headers/log2d2.h" -#include "headers/dom_chkd_less_than.h" - -static __inline double _log2(double x) -{ - double res; - vector double vx; - vector double vc = { 0.0, 0.0 }; - - vx = spu_promote(x, 0); - res = spu_extract(_log2d2(vx), 0); -#ifndef _IEEE_LIBM - dom_chkd_less_than(vx, vc); -#endif - return res; -} diff --git a/newlib/libm/machine/spu/headers/log2d2.h b/newlib/libm/machine/spu/headers/log2d2.h deleted file mode 100644 index 9bdbb772d..000000000 --- a/newlib/libm/machine/spu/headers/log2d2.h +++ /dev/null @@ -1,145 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ - -#ifdef __SPU__ -#ifndef _LOG2D2_H_ -#define _LOG2D2_H_ 1 - -#include - -/* - * FUNCTION - * vector double _log2d2(vector double x) - * - * DESCRIPTION - * The function _log2d2 computes log base 2 of the input x for each - * of the double word elements of x. The log2 is decomposed - * into two parts, log2 of the exponent and log2 of the - * fraction. The log2 of the fraction is approximated - * using a 21st order polynomial of the form: - * - * __20_ - * \ - * log(x) = x * (1 + \ (Ci * x^i)) - * / - * /____ - * i=0 - * - * for x in the range 0-1. - */ -#define LOG_C00 -#define LOG_C01 -#define LOG_C02 - -static __inline vector double _log2d2(vector double vx) -{ - vec_int4 addval; - vec_ullong2 exp_mask = spu_splats(0x7FF0000000000000ULL); - vec_double2 vy, vxw; - vec_double2 v1 = spu_splats(1.0); - vec_double2 x2, x4, x8, x10, p1, p2; - - /* Extract the fraction component of input by forcing - * its exponent so that input is in the range [1.0, 2.0) - * and then subtract 1.0 to force it in the range - * [0.0, 1.0). - */ - vxw = spu_sub(spu_sel(vx, v1, exp_mask), v1); - - /* Compute the log2 of the exponent as exp - 1023. - */ - addval = spu_add(spu_rlmask((vec_int4)vx, -20), -1023); - - /* Compute the log2 of the fractional component using a 21st - * order polynomial. The polynomial is evaluated in two halves - * to improve efficiency. - */ - p1 = spu_madd(spu_splats(3.61276447184348752E-05), vxw, spu_splats(-4.16662127033480827E-04)); - p2 = spu_madd(spu_splats(-1.43988260692073185E-01), vxw, spu_splats(1.60245637034704267E-01)); - p1 = spu_madd(vxw, p1, spu_splats(2.28193656337578229E-03)); - p2 = spu_madd(vxw, p2, spu_splats(-1.80329036970820794E-01)); - p1 = spu_madd(vxw, p1, spu_splats(-7.93793829370930689E-03)); - p2 = spu_madd(vxw, p2, spu_splats(2.06098446037376922E-01)); - p1 = spu_madd(vxw, p1, spu_splats(1.98461565426430164E-02)); - p2 = spu_madd(vxw, p2, spu_splats(-2.40449108727688962E-01)); - p1 = spu_madd(vxw, p1, spu_splats(-3.84093543662501949E-02)); - p2 = spu_madd(vxw, p2, spu_splats(2.88539004851839364E-01)); - p1 = spu_madd(vxw, p1, spu_splats(6.08335872067172597E-02)); - p2 = spu_madd(vxw, p2, spu_splats(-3.60673760117245982E-01)); - p1 = spu_madd(vxw, p1, spu_splats(-8.27937055456904317E-02)); - p2 = spu_madd(vxw, p2, spu_splats(4.80898346961226595E-01)); - p1 = spu_madd(vxw, p1, spu_splats(1.01392360727236079E-01)); - p2 = spu_madd(vxw, p2, spu_splats(-7.21347520444469934E-01)); - p1 = spu_madd(vxw, p1, spu_splats(-1.16530490533844182E-01)); - p2 = spu_madd(vxw, p2, spu_splats(0.44269504088896339E+00)); - p1 = spu_madd(vxw, p1, spu_splats(1.30009193360025350E-01)); - - x2 = spu_mul(vxw, vxw); - x4 = spu_mul(x2, x2); - x8 = spu_mul(x4, x4); - x10 = spu_mul(x8, x2); - - vy = spu_madd(spu_madd(x10, p1, p2), vxw, vxw); - - /* Add the log2(exponent) and the log2(fraction) to - * compute the final result. - */ - vy = spu_add(vy, spu_extend(spu_convtf(addval, 0))); - - vxw = spu_extend(spu_convtf(addval, 20)); - - return(vy); -} - -#endif /* _LOG2D2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/log2f.h b/newlib/libm/machine/spu/headers/log2f.h deleted file mode 100644 index 26717c7c0..000000000 --- a/newlib/libm/machine/spu/headers/log2f.h +++ /dev/null @@ -1,124 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _LOG2F_H_ -#define _LOG2F_H_ 1 - -#include -#include "headers/dom_chkf_less_than.h" - -/* - * FUNCTION - * float _log2f(float x) - * - * DESCRIPTION - * _log2f computes log (base 2) of the input value x. The log2f - * function is approximated as a polynomial of order 8 - * (C. Hastings, Jr, 1955). - * - * __8__ - * \ - * \ - * log2f(1+x) = / Ci*x^i - * /____ - * i=1 - * - * for x in the range 0.0 to 1.0 - * - * C1 = 1.4426898816672 - * C2 = -0.72116591947498 - * C3 = 0.47868480909345 - * C4 = -0.34730547155299 - * C5 = 0.24187369696082 - * C6 = -0.13753123777116 - * C7 = 0.052064690894143 - * C8 = -0.0093104962134977 - * - * This function assumes that x is a non-zero positive value. - */ - -static __inline float _log2f(float x) -{ - union { - unsigned int ui; - float f; - } in; - int exponent; - float result; - float x2, x4; - float hi, lo; - vector float vx; - vector float vc = { 0.0, 0.0, 0.0, 0.0 }; - - in.f = x; - - /* Extract the exponent from the input X. - */ - exponent = (signed)((in.ui >> 23) & 0xFF) - 127; - - /* Compute the remainder after removing the exponent. - */ - in.ui -= exponent << 23; - - /* Calculate the log2 of the remainder using the polynomial - * approximation. - */ - x = in.f - 1.0f; - - /* Instruction counts can be reduced if the polynomial was - * computed entirely from nested (dependent) fma's. However, - * to reduce the number of pipeline stalls, the polygon is evaluated - * in two halves (hi amd lo). - */ - x2 = x * x; - x4 = x2 * x2; - hi = -0.0093104962134977f*x + 0.052064690894143f; - hi = hi*x - 0.13753123777116f; - hi = hi*x + 0.24187369696082f; - hi = hi*x - 0.34730547155299f; - lo = 0.47868480909345f *x - 0.72116591947498f; - lo = lo*x + 1.4426898816672f; - lo = lo*x; - result = hi*x4 + lo; - - /* Add the exponent back into the result. - */ - result += (float)(exponent); - -#ifndef _IEEE_LIBM - vx = spu_promote(x, 0); - dom_chkf_less_than(vx, vc); -#endif - return (result); -} - -#endif /* _LOG2F_H_ */ diff --git a/newlib/libm/machine/spu/headers/log2f4.h b/newlib/libm/machine/spu/headers/log2f4.h deleted file mode 100644 index b19ec24bb..000000000 --- a/newlib/libm/machine/spu/headers/log2f4.h +++ /dev/null @@ -1,136 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ - -#ifndef _LOG2F4_H_ -#define _LOG2F4_H_ 1 - -#include - -/* - * FUNCTION - * vector float _log2f4(vector float x) - * - * DESCRIPTION - * The _log2f4 function computes log (base 2) on a vector if inputs - * values x. The _log2f4 function is approximated as a polynomial of - * order 8 (C. Hastings, Jr, 1955). - * - * __8__ - * \ - * \ - * log2f(1+x) = / Ci*x^i - * /____ - * i=1 - * - * for x in the range 0.0 to 1.0 - * - * C1 = 1.4426898816672 - * C2 = -0.72116591947498 - * C3 = 0.47868480909345 - * C4 = -0.34730547155299 - * C5 = 0.24187369696082 - * C6 = -0.13753123777116 - * C7 = 0.052064690894143 - * C8 = -0.0093104962134977 - * - * This function assumes that x is a non-zero positive value. - * - */ -static __inline vector float _log2f4(vector float x) -{ - vector signed int exponent; - vector float result; - vector float x2, x4; - vector float hi, lo; - - /* Extract the exponent from the input X. - */ - exponent = (vector signed int)spu_and(spu_rlmask((vector unsigned int)(x), -23), 0xFF); - exponent = spu_add(exponent, -127); - - /* Compute the remainder after removing the exponent. - */ - x = (vector float)spu_sub((vector signed int)(x), spu_sl(exponent, 23)); - - /* Calculate the log2 of the remainder using the polynomial - * approximation. - */ - x = spu_sub(x, spu_splats(1.0f)); - - /* Instruction counts can be reduced if the polynomial was - * computed entirely from nested (dependent) fma's. However, - * to reduce the number of pipeline stalls, the polygon is evaluated - * in two halves (hi amd lo). - */ - x2 = spu_mul(x, x); - x4 = spu_mul(x2, x2); - - hi = spu_madd(x, spu_splats(-0.0093104962134977f), spu_splats(0.052064690894143f)); - hi = spu_madd(x, hi, spu_splats(-0.13753123777116f)); - hi = spu_madd(x, hi, spu_splats( 0.24187369696082f)); - hi = spu_madd(x, hi, spu_splats(-0.34730547155299f)); - lo = spu_madd(x, spu_splats(0.47868480909345f), spu_splats(-0.72116591947498f)); - lo = spu_madd(x, lo, spu_splats(1.4426898816672f)); - lo = spu_mul(x, lo); - result = spu_madd(x4, hi, lo); - - /* Add the exponent back into the result. - */ - result = spu_add(result, spu_convtf(exponent, 0)); - - return (result); -} - -#endif /* _LOG2F4_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/logbf.h b/newlib/libm/machine/spu/headers/logbf.h deleted file mode 100644 index b98256f19..000000000 --- a/newlib/libm/machine/spu/headers/logbf.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/logbf4.h" - -static __inline float _logbf(float x) -{ - return spu_extract(_logbf4(spu_promote(x, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/logbf4.h b/newlib/libm/machine/spu/headers/logbf4.h deleted file mode 100644 index d3dbeeb93..000000000 --- a/newlib/libm/machine/spu/headers/logbf4.h +++ /dev/null @@ -1,111 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ - -#ifndef _LOGBF4_H_ -#define _LOGBF4_H_ 1 - -#include -#include - -/* - * FUNCTION - * vector float _scalbnf4(vector float x, vector signed int exp) - * - * DESCRIPTION - * The _scalbnf4 function returns a vector containing each element of x - * multiplied by 2^n computed efficiently. This function is computed - * without the assistance of any floating point operations and as such - * does not set any floating point exceptions. - * - * Special Cases: - * - if the exponent is 0, then x is either 0 or a subnormal, and the - * result will be returned as 0. - * - if the result if underflows, it will be returned as 0. - * - if the result overflows, it will be returned as FLT_MAX. - * - */ -static __inline vector float _logbf4(vector float x) -{ - vec_uint4 lzero = (vector unsigned int) {0, 0, 0, 0}; - vec_uint4 exp_mask = (vector unsigned int) {0xFF, 0xFF, 0xFF, 0xFF}; - vec_int4 exp_shift = (vector signed int) { -23, -23, -23, -23}; - vec_int4 exp_bias = (vector signed int) {-127, -127, -127, -127}; - vec_uint4 sign_mask = (vector unsigned int) {0x80000000, 0x80000000, - 0x80000000, 0x80000000}; - vec_uint4 linf = (vector unsigned int) {0x7F800000, 0x7F800000, - 0x7F800000, 0x7F800000}; - vec_uint4 lminf = (vector unsigned int) {0xFF800000, 0xFF800000, - 0xFF800000, 0xFF800000}; - vec_uint4 exp; - vec_uint4 xabs; - vec_float4 exp_unbias; - - - xabs = spu_andc((vec_uint4)x, sign_mask); - - exp = spu_and(spu_rlmask((vec_uint4)x, exp_shift), exp_mask); - exp_unbias = spu_convtf(spu_add((vec_int4)exp, exp_bias), 0); - - /* Zero */ - exp_unbias = spu_sel(exp_unbias, (vec_float4)lminf, (vec_uint4)spu_cmpeq(xabs, lzero)); - - /* NaN */ - exp_unbias = spu_sel(exp_unbias, x, (vec_uint4)spu_cmpgt(xabs, linf)); - - /* Infinite */ - exp_unbias = spu_sel(exp_unbias, (vec_float4)linf, (vec_uint4)spu_cmpeq(xabs, linf)); - - return (exp_unbias); -} - -#endif /* _LOGBF4_H_ */ - -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/logd2.h b/newlib/libm/machine/spu/headers/logd2.h deleted file mode 100644 index a9f25a966..000000000 --- a/newlib/libm/machine/spu/headers/logd2.h +++ /dev/null @@ -1,79 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _LOGD2_H_ -#define _LOGD2_H_ 1 - -#include -#include "simdmath.h" -#include "log2d2.h" - - -/* - * FUNCTION - * vector double _logd2(vector double x) - * - * DESCRIPTION - * The _logd2 function computes the natural log for each double word - * element of the input x. _logd2 is computed using log2d2 as follows: - * - * logd2(x) = log2d2(x) / log2d2(e) = log2d2(x) * logd2(2) - * - */ -static __inline vector double _logd2(vector double x) -{ - return (spu_mul(_log2d2(x), spu_splats(SM_LN2))); -} - -#endif /* _LOGD2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/logf.h b/newlib/libm/machine/spu/headers/logf.h deleted file mode 100644 index e841d2135..000000000 --- a/newlib/libm/machine/spu/headers/logf.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _LOGF_H_ -#define _LOGF_H_ 1 - -#include "log2f.h" - -/* - * FUNCTION - * float _logf(float x) - * - * DESCRIPTION - * _logf computes the natural log (base e) of the input value x. log - * is computed using log2 as follows: - * - * logf(x) = log2f(x) / log2f(e); - */ - -static __inline float _logf(float x) -{ - return (_log2f(x) * 0.69314718055995f); -} - -#endif /* _LOGF_H_ */ diff --git a/newlib/libm/machine/spu/headers/logf4.h b/newlib/libm/machine/spu/headers/logf4.h deleted file mode 100644 index 667d25dd0..000000000 --- a/newlib/libm/machine/spu/headers/logf4.h +++ /dev/null @@ -1,76 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _LOGF4_H_ -#define _LOGF4_H_ 1 - -#include "log2f4.h" - -/* - * FUNCTION - * vector float _logf4(vector float x) - * - * DESCRIPTION - * The _logf4 function computes the natural log (base e) of the input - * vector of values x. logf4 is computed using log2f4 as follows: - * - * logf4(x) = log2f4(x) / log2f4(e); - * - */ -static __inline vector float _logf4(vector float x) -{ - return (spu_mul(_log2f4(x), spu_splats(0.69314718055995f))); -} - -#endif /* _LOGF4_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/lrint.h b/newlib/libm/machine/spu/headers/lrint.h deleted file mode 100644 index 818720a12..000000000 --- a/newlib/libm/machine/spu/headers/lrint.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _LRINT_H_ -#define _LRINT_H_ 1 - -#include -#include "headers/vec_literal.h" - -/* Round the input to the nearest integer according to the current - * rounding mode. - */ -static __inline long int _lrint(double x) -{ - vec_int4 out, sign; - vec_double2 in, addend; - - in = spu_promote(x, 0); - - /* Add 2^53 affect a round to be performed by the hardware. - */ - addend = spu_sel((vec_double2)(VEC_SPLAT_U64(0x4330000000000000ULL)), - in, VEC_SPLAT_U64(0x8000000000000000ULL)); - out = (vec_int4)spu_rlqwbyte(spu_add(in, addend), 4); - - /* Correct the output sign. - */ - sign = spu_rlmaska((vec_int4)in, -31); - - out = spu_sub(spu_xor(out, sign), sign); - - return ((long int)spu_extract(out, 0)); -} -#endif /* _LRINT_H_ */ diff --git a/newlib/libm/machine/spu/headers/lrintf.h b/newlib/libm/machine/spu/headers/lrintf.h deleted file mode 100644 index dc04227bb..000000000 --- a/newlib/libm/machine/spu/headers/lrintf.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _LRINTF_H_ -#define _LRINTF_H_ 1 - -#include - -/* Round the input to the nearest integer according to the current - * rounding mode. No special handling is performed when values are - * outside the 32-bit range. - */ -static __inline long int _lrintf(float x) -{ - return ((long int)spu_extract(spu_convts(spu_promote(x, 0), 0), 0)); -} -#endif /* _LRINTF_H_ */ diff --git a/newlib/libm/machine/spu/headers/lround.h b/newlib/libm/machine/spu/headers/lround.h deleted file mode 100644 index 2a1e3269a..000000000 --- a/newlib/libm/machine/spu/headers/lround.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _LROUND_H_ -#define _LROUND_H_ 1 - -#include -#include "headers/vec_literal.h" - -/* Round the input to the nearest integer value, rounding halfway cases - * away from zero. No special handling is performed when values are - * outside the 32-bit range. - */ - -static __inline long int _lround(double x) -{ - int shift; - vec_int4 exp; - vec_uint4 mant, sign, mask, addend; - vec_double2 in; - - in = spu_promote(x, 0); - - /* Determine how many bits to shift the mantissa to correctly - * align it into long long element 0. - */ - exp = spu_and(spu_rlmask((vec_int4)in, -20), 0x7FF); - exp = spu_add(exp, -979); - shift = spu_extract(exp, 0); - - mask = spu_cmpgt(exp, 0); - - /* Algn mantissa bits - */ - mant = spu_sel(spu_rlmaskqwbyte((vec_uint4)in, -8), VEC_SPLAT_U32(0x00100000), - VEC_LITERAL(vec_uint4, 0,0,0xFFF00000,0)); - - mant = spu_slqwbytebc(spu_slqw(mant, shift), shift); - - /* Perform round by adding 1 if the fraction bits are - * greater than or equal to .5 - */ - addend = spu_and(spu_rlqw(mant, 1), 1); - mant = spu_and(spu_add(mant, addend), mask); - - /* Compute the two's complement of the mantissa if the - * input is negative. - */ - sign = (vec_uint4)spu_rlmaska((vec_int4)in, -31); - - mant = spu_sub(spu_xor(mant, sign), sign); - - return ((long int)spu_extract(mant, 0)); -} -#endif /* _LROUND_H_ */ diff --git a/newlib/libm/machine/spu/headers/lroundf.h b/newlib/libm/machine/spu/headers/lroundf.h deleted file mode 100644 index b9651a56a..000000000 --- a/newlib/libm/machine/spu/headers/lroundf.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _LROUNDF_H_ -#define _LROUNDF_H_ 1 - -#include -#include "headers/vec_literal.h" - -/* Round the input to the nearest integer value, rounding halfway cases - * away from zero. No special handling is performed when values are - * outside the 32-bit range. - */ -static __inline long int _lroundf(float x) -{ - vec_int4 out; - vec_float4 in, addend; - - in = spu_promote(x, 0); - - /* Add signed 0.5 */ - addend = spu_sel(VEC_SPLAT_F32(0.5f), in, VEC_SPLAT_U32(0x80000000)); - out = spu_convts(spu_add(in, addend), 0); - - return ((long int)spu_extract(out, 0)); -} -#endif /* _LROUNDF_H_ */ diff --git a/newlib/libm/machine/spu/headers/nearbyint.h b/newlib/libm/machine/spu/headers/nearbyint.h deleted file mode 100644 index beef45932..000000000 --- a/newlib/libm/machine/spu/headers/nearbyint.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _NEARBYINT_H_ -#define _NEARBYINT_H_ 1 - -#include -#include "headers/vec_literal.h" - -/* Round the input to the nearest integer according to the current - * rounding mode without raising an inexact exception. - */ -static __inline double _nearbyint(double x) -{ - vec_uint4 fpscr; - vec_ullong2 sign = VEC_SPLAT_U64(0x8000000000000000ULL); - vec_double2 in, out, addend; - - fpscr = spu_mffpscr(); - - in = spu_promote(x, 0); - - /* Add 2^53 and then subtract 2^53 to affect a round to be performed by the - * hardware. Also preserve the input sign so that negative inputs that - * round to zero generate a -0.0. - */ - addend = spu_sel((vec_double2)(VEC_SPLAT_U64(0x4330000000000000ULL)), - in, sign); - out = spu_sel(spu_sub(spu_add(in, addend), addend), in, sign); - - spu_mtfpscr(fpscr); - - return (spu_extract(out, 0)); -} -#endif /* _NEARBYINT_H_ */ diff --git a/newlib/libm/machine/spu/headers/nearbyintf.h b/newlib/libm/machine/spu/headers/nearbyintf.h deleted file mode 100644 index b82572022..000000000 --- a/newlib/libm/machine/spu/headers/nearbyintf.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/nearbyintf4.h" - -static __inline float _nearbyintf(float x) -{ - return spu_extract(_nearbyintf4(spu_promote(x, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/nearbyintf4.h b/newlib/libm/machine/spu/headers/nearbyintf4.h deleted file mode 100644 index 746796c32..000000000 --- a/newlib/libm/machine/spu/headers/nearbyintf4.h +++ /dev/null @@ -1,74 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _NEARBYINTF4_H_ -#define _NEARBYINTF4_H_ 1 - -#include "truncf4.h" - -/* - * FUNCTION - * vector float _nearbyintf4(vector float x) - * - * DESCRIPTION - * The SPU doesn't support directed rounding. Within the simdmath - * library, nearbyintf4 is aliased to truncf4. This header merely - * provides inlinable compatibility - * - */ -static __inline vector float _nearbyintf4(vector float x) -{ - return _truncf4(x); -} -#endif /* _NEARBYINTF4_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/nextafter.h b/newlib/libm/machine/spu/headers/nextafter.h deleted file mode 100644 index 0dfbb8285..000000000 --- a/newlib/libm/machine/spu/headers/nextafter.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/nextafterd2.h" - -static __inline double _nextafter(double x, double y) -{ - return spu_extract(_nextafterd2(spu_promote(x, 0), spu_promote(y, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/nextafterd2.h b/newlib/libm/machine/spu/headers/nextafterd2.h deleted file mode 100644 index 78238487a..000000000 --- a/newlib/libm/machine/spu/headers/nextafterd2.h +++ /dev/null @@ -1,124 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _NEXTAFTERD2_H_ -#define _NEXTAFTERD2_H_ 1 - -#include - -/* - * FUNCTION - * vector double _nextafterd2(vector double x, vector double y) - * - * DESCRIPTION - * The nextafterf4 function returns a vector containing the next representable - * floating-point number after the element of x, in the direction of the - * corresponding element y. - * - * Special Cases: - * - nextafter(NaN, y) = NaN - * - nextafter(x, NaN) = NaN - * - x = largest finite value, y = infinity, result is undefined - * - x = largest finite negative value, y = -infinity, result is undefined - * - x != y, and result = 0, considered an underflow - * - */ - -static __inline vector double _nextafterd2(vector double x, vector double y) -{ - vec_double2 n1ulp = (vec_double2)spu_splats(0x8000000000000001ull); - vec_double2 zerod = spu_splats(0.0); - vec_llong2 one = spu_splats(1ll); - vec_ullong2 xlt0, xgty, xeqy, xeq0; - vec_llong2 xllong; - vec_llong2 delta, deltap1; - vec_double2 result; - - /* Compiler Bug. Replace xtmp/ytmp with x/y when spu_cmpgt(x,y) doesn't change x/y!*/ - volatile vec_double2 xtmp = x; - volatile vec_double2 ytmp = y; - - /* - * The idea here is to treat x as a signed long long value, which allows us to - * add or subtact one to/from it to get the next representable value. - */ - - xeq0 = spu_cmpeq(xtmp, zerod); - xlt0 = spu_cmpgt(zerod, xtmp); - xeqy = spu_cmpeq(xtmp, ytmp); - xgty = spu_cmpgt(xtmp, ytmp); - - /* If x = -0.0, set x = 0.0 */ - x = spu_andc(x, (vec_double2)xeq0); - - xllong = (vec_llong2)x; - - /* Determine value to add to x */ - delta = (vec_llong2)spu_xor(xgty, xlt0); - deltap1 = delta + one; - delta = spu_sel(deltap1, delta, (vec_ullong2)delta); - - xllong = xllong + delta; - - /* Fix the case of x = 0, and answer should be -1 ulp */ - result = spu_sel((vec_double2)xllong, n1ulp, spu_and((vec_ullong2)delta, xeq0)); - - /* - * Special Cases - */ - - /* x = y */ - result = spu_sel(result, y, xeqy); - - return result; -} - -#endif /* _NEXTAFTERD2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/nextafterf.h b/newlib/libm/machine/spu/headers/nextafterf.h deleted file mode 100644 index a8c0418cf..000000000 --- a/newlib/libm/machine/spu/headers/nextafterf.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/nextafterf4.h" - -static __inline float _nextafterf(float x, float y) -{ - return spu_extract(_nextafterf4(spu_promote(x, 0), spu_promote(y, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/nextafterf4.h b/newlib/libm/machine/spu/headers/nextafterf4.h deleted file mode 100644 index 15a5e3daf..000000000 --- a/newlib/libm/machine/spu/headers/nextafterf4.h +++ /dev/null @@ -1,120 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _NEXTAFTERF4_H_ -#define _NEXTAFTERF4_H_ 1 - -#include - -/* - * FUNCTION - * vector float _nextafterf4(vector float x, vector float y) - * - * DESCRIPTION - * The nextafterf4 function returns a vector containing the next representable - * floating-point number after the element of x, in the direction of the - * corresponding element y. - * - * Special Cases: - * - Infinity and NaN are not supported in single-precision on SPU. They are treated - * as normal numbers. - * - x != y, and result = 0 is considered an underflow. - * - * - */ - -static __inline vector float _nextafterf4(vector float x, vector float y) -{ - vec_float4 n1ulp = (vec_float4)spu_splats(0x80000001); - vec_float4 zerof = spu_splats(0.0f); - vec_int4 one = spu_splats(1); - vec_uint4 xlt0, xgty, xeqy, xeq0; - vec_int4 xint; - vec_int4 delta, deltap1; - vec_float4 result; - - /* - * The idea here is to treat x as a signed int value, which allows us to - * add or subtact one to/from it to get the next representable value. - */ - - xeq0 = spu_cmpeq(x, zerof); - xlt0 = spu_cmpgt(zerof, x); - xeqy = spu_cmpeq(x, y); - xgty = spu_cmpgt(x, y); - - /* If x = -0.0, set x = 0.0 */ - x = spu_andc(x, (vec_float4)xeq0); - - xint = (vec_int4)x; - - /* Determine value to add to x */ - delta = (vec_int4)spu_xor(xgty, xlt0); - deltap1 = delta + one; - delta = spu_sel(deltap1, delta, (vec_uint4)delta); - - xint = xint + delta; - - /* Fix the case of x = 0, and answer should be -1 ulp */ - result = spu_sel((vec_float4)xint, n1ulp, spu_and((vec_uint4)delta, xeq0)); - - /* - * Special Cases - */ - - /* x = y */ - result = spu_sel(result, y, xeqy); - - return result; - -} - -#endif /* _NEXTAFTERF4_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/pow.h b/newlib/libm/machine/spu/headers/pow.h deleted file mode 100644 index 224d2f402..000000000 --- a/newlib/libm/machine/spu/headers/pow.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/powd2.h" - -static __inline double _pow(double x, double y) -{ - return spu_extract(_powd2(spu_promote(x, 0), spu_promote(y, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/powd2.h b/newlib/libm/machine/spu/headers/powd2.h deleted file mode 100644 index 98234a620..000000000 --- a/newlib/libm/machine/spu/headers/powd2.h +++ /dev/null @@ -1,133 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _POWD2_H_ -#define _POWD2_H_ 1 - -#include "exp2d2.h" -#include "log2d2.h" - -/* - * FUNCTION - * vector double _powd2(vector double x, vector double y) - * - * DESCRIPTION - * The _powd2 function computes x raised to the power y for the set of - * vectors. The powd2 function is computed as by decomposing - * the problem into: - * - * x^y = 2^(y*log2(x)) - * - * - */ -static __inline vector double _powd2(vector double x, vector double y) -{ - vec_uchar16 splat_hi = (vec_uchar16) { 0,1,2,3,0,1,2,3, 8,9,10,11, 8,9,10,11 }; - vec_int4 exp, shift; - vec_uint4 sign = (vec_uint4) { 0x80000000, 0, 0x80000000, 0 }; - vec_uint4 or_mask, and_mask, evenmask, intmask; - vec_double2 in_hi; - vector double signmask = spu_splats(-0.0); - vector signed int error = spu_splats(-1); - vector double zero = spu_splats(0.0); - vector unsigned int y_is_int, y_is_odd, y_is_even; - vector unsigned int x_is_neg; - vector double xabs, xsign; - vector double out; - - - xsign = spu_and(x, signmask); - xabs = spu_andc(x, signmask); - x_is_neg = (vec_uint4)spu_cmpgt(zero, x); - - - /* First we solve assuming x was non-negative */ - out = _exp2d2(spu_mul(y, _log2d2(xabs))); - - in_hi = spu_shuffle(y, y, splat_hi); - exp = spu_and(spu_rlmask((vec_int4)in_hi, -20), 0x7FF); - - /* Determine if y is an integer */ - shift = spu_sub(((vec_int4) { 1023, 1043, 1023, 1043 }), exp); - or_mask = spu_andc(spu_cmpgt(shift, 0), sign); - and_mask = spu_rlmask(((vec_uint4) { 0xFFFFF, -1, 0xFFFFF, -1 }), shift); - intmask = spu_or(spu_and(and_mask, spu_cmpgt(shift, -32)), or_mask); - y_is_int = (vec_uint4)spu_cmpeq(y, spu_andc(y, (vec_double2)(intmask))); - - /* Determine if y is an even integer */ - shift = spu_sub(((vec_int4) { 1024, 1044, 1024, 1044 }), exp); - or_mask = spu_andc(spu_cmpgt(shift, 0), sign); - and_mask = spu_rlmask(((vec_uint4) { 0xFFFFF, -1, 0xFFFFF, -1 }), shift); - evenmask = spu_or(spu_and(and_mask, spu_cmpgt(shift, -32)), or_mask); - y_is_even = (vec_uint4)spu_cmpeq(y, spu_andc(y, (vec_double2)(evenmask))); - - y_is_odd = spu_andc(y_is_int, y_is_even); - - - /* Special Cases - */ - - /* x < 0 is only ok when y integer */ - out = spu_sel(out, (vec_double2)error, (vec_ullong2)spu_andc(x_is_neg, y_is_int)); - - /* Preserve the sign of x if y is an odd integer */ - out = spu_sel(out, spu_or(out, xsign), (vec_ullong2)y_is_odd); - - /* x = anything, y = +/- 0, returns 1 */ - out = spu_sel(out, spu_splats(1.0), spu_cmpabseq(y, zero)); - - return(out); -} - -#endif /* _POWD2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/powf.h b/newlib/libm/machine/spu/headers/powf.h deleted file mode 100644 index fb0f98c43..000000000 --- a/newlib/libm/machine/spu/headers/powf.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/powf4.h" - -static __inline double _powf(float x, float y) -{ - return spu_extract(_powf4(spu_promote(x, 0), spu_promote(y, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/powf4.h b/newlib/libm/machine/spu/headers/powf4.h deleted file mode 100644 index 9eec44b32..000000000 --- a/newlib/libm/machine/spu/headers/powf4.h +++ /dev/null @@ -1,132 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _POWF4_H_ -#define _POWF4_H_ 1 - -#include -#include - -#include "exp2f4.h" -#include "log2f4.h" - -/* - * FUNCTION - * vector float _powf4(vector float x, vector float y) - * - * DESCRIPTION - * The _powf4 function computes x raised to the power y for the set of - * vectors. The powf4 function is computed as by decomposing - * the problem into: - * - * x^y = 2^(y*log2(x)) - * - */ -static __inline vector float _powf4(vector float x, vector float y) -{ - vec_uint4 y_exp; - vec_uint4 y_mantissa; - vec_uint4 mant_shift; - vec_uint4 y_is_int; - vec_uint4 y_is_odd; - vec_uint4 x_sign_bit; - vec_uint4 zero = (vec_uint4)spu_splats(0); - vec_uint4 bit0 = (vec_uint4)spu_splats(0x80000000); - vec_int4 error = spu_splats(-1); - vec_float4 out; - - y_exp = spu_and(spu_rlmask((vec_uint4)y, -23), 0x000000FF); - - /* Need the implied bit in the mantissa to catch - * y = 1 case later - */ - y_mantissa = spu_or(spu_sl((vec_uint4)y, (unsigned int)8), bit0); - - x_sign_bit = spu_and((vec_uint4)x, bit0); - - /* We are going to shift the mantissa over enough to - * determine if we have an integer. - */ - mant_shift = spu_add(y_exp, -127); - - - /* Leave the lowest-order integer bit of mantissa on the - * high end so we can see if the integer is odd. - */ - y_mantissa = spu_sl(y_mantissa, mant_shift); - - y_is_int = spu_cmpeq(spu_andc(y_mantissa, bit0), 0); - y_is_int = spu_and(y_is_int, spu_cmpgt(y_exp, 126)); - - y_is_odd = spu_and(spu_cmpeq(y_mantissa, bit0), y_is_int); - - out = _exp2f4(spu_mul(y, _log2f4(spu_andc(x, (vec_float4)bit0)))); - - /* x < 0 is only ok when y integer - */ - out = spu_sel(out, (vec_float4)error, - spu_andc(spu_cmpeq(x_sign_bit, bit0), y_is_int)); - - /* Preserve the sign of x if y is an odd integer - */ - out = spu_sel(out, spu_or(out, (vec_float4)x_sign_bit), y_is_odd); - - /* x = anything, y = +/- 0, returns 1 - */ - out = spu_sel(out, spu_splats(1.0f), spu_cmpabseq(y, (vec_float4)zero)); - - return(out); -} - -#endif /* _POWF4_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/recipd2.h b/newlib/libm/machine/spu/headers/recipd2.h deleted file mode 100644 index 463769db4..000000000 --- a/newlib/libm/machine/spu/headers/recipd2.h +++ /dev/null @@ -1,114 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ - -#ifndef _RECIPD2_H_ -#define _RECIPD2_H_ 1 - -#include - - -/* - * FUNCTION - * vector double _recipd2(vector double value) - * - * DESCRIPTION - * The _recipd2 function inverts "value" and returns the result. - * Computation is performed using the single precision reciprocal - * estimate and interpolate instructions to produce a 12 accurate - * estimate. - * - * One (1) iteration of a Newton-Raphson is performed to improve - * accuracy to single precision floating point. Two additional double - * precision iterations are needed to achieve a full double - * preicision result. - * - * The Newton-Raphson iteration is of the form: - * X[i+1] = X[i] * (2.0 - b*X[i]) - * where b is the input value to be inverted - * - */ -static __inline vector double _recipd2(vector double value_d) -{ - vector unsigned long long zero = (vector unsigned long long) { 0x0000000000000000ULL, 0x0000000000000000ULL }; - vector unsigned long long expmask = (vector unsigned long long) { 0x7FF0000000000000ULL, 0x7FF0000000000000ULL }; - vector unsigned long long signmask = (vector unsigned long long) { 0x8000000000000000ULL, 0x8000000000000000ULL }; - vector float x0; - vector float value; - vector float two = spu_splats(2.0f); - vector double two_d = spu_splats(2.0); - vector double x1, x2, x3; - vector double bias; - - /* Bias the divisor to correct for double precision floating - * point exponents that are out of single precision range. - */ - bias = spu_xor(spu_and(value_d, (vector double)expmask), (vector double)expmask); - value = spu_roundtf(spu_mul(value_d, bias)); - x0 = spu_re(value); - x1 = spu_extend(spu_mul(x0, spu_nmsub(value, x0, two))); - x1 = spu_mul(x1, bias); - x2 = spu_mul(x1, spu_nmsub(value_d, x1, two_d)); - x3 = spu_mul(x2, spu_nmsub(value_d, x2, two_d)); - - /* Handle input = +/- infinity or +/-0. */ - vec_double2 xabs = spu_andc(value_d, (vec_double2)signmask); - vec_ullong2 zeroinf = spu_or(spu_cmpeq(xabs, (vec_double2)expmask), - spu_cmpeq(xabs, (vec_double2)zero)); - x3 = spu_sel(x3, spu_xor(value_d, (vector double)expmask), zeroinf); - - return (x3); -} - -#endif /* _RECIPD2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/recipf4.h b/newlib/libm/machine/spu/headers/recipf4.h deleted file mode 100644 index 3a0287412..000000000 --- a/newlib/libm/machine/spu/headers/recipf4.h +++ /dev/null @@ -1,154 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _RECIPF4_H_ -#define _RECIPF4_H_ 1 - -#include - -/* - * FUNCTION - * vector float _recipf4(vector float value) - * - * DESCRIPTION - * The _recipf4 function inverts the vector "value" and returns the - * result. - * - */ -static __inline vector float _recipf4(vector float a) -{ - /* This function has been designed to provide a - * full function operation that presisely computes - * the reciprocal for the entire range of extended - * single precision input . This includes: - * - * 1) Computing the reciprocal to full single precision - * floating point accuracy. - * 2) Round the result consistently with the rounding - * mode of the processor - truncated toward zero. - * 3) Underflow and overflow results are clamped to - * Smin and Smax and flagged with the appropriate - * UNF or OVF exception in the FPSCR. - * 4) Divide By Zero (DBZ) exception is produced when - * the input has a zero exponent. A reciprocal - * of correctly signed Smax is produced. - * 5) Resulting denorm reciprocal will be coerced to +0. - * 6) If a non-compliant IEEE result is produced, the - * a DIFF exception is generated. - */ - vector float err, x0, x1; - vector float mult; - vector float mant_a; - vector float one = spu_splats(1.0f); - vector unsigned int exp, exp_a; - vector unsigned int exp_mask = (vec_uint4)spu_splats(0x7F800000); - - /* If a has a zero exponent, then set the divide by zero - * (DBZ) exception flag. The estimate result is discarded. - */ - (void)si_frest((qword)(a)); - - /* For computing the reciprocal, force the value - * into the range (1.0 <= 0 < 2.0). - */ - mant_a = spu_sel(a, one, exp_mask); - - /* Compute the reciprocal using the reciprocal estimate - * followed by one iteration of the Newton-Raphson. - * Due to truncation error, the quotient result may be low - * by 1 ulp (unit of least position). Conditionally add one - * if the estimate is too small. - */ - x0 = spu_re(mant_a); - x0 = spu_madd(spu_nmsub(mant_a, x0, one), x0, x0); - - x1 = (vector float)(spu_add((vector unsigned int)(x0), 1)); - err = spu_nmsub(mant_a, x1, one); - - x1 = spu_sel(x0, x1, spu_cmpgt((vector signed int)(err), -1)); - - /* Compute the reciprocal's expected exponent. If the exponent - * is out of range, then force the resulting exponent to 0. - * (127 with the bias). We correct for the out of range - * values by computing a multiplier (mult) that will force the - * result to the correct out of range value and set the - * correct exception flag (UNF, OVF, or neither). The multiplier - * is also conditioned to generate correctly signed Smax if the - * inoput is a denorm or zero. - */ - exp_a = spu_and((vector unsigned int)a, exp_mask); - exp = spu_add(spu_sub(spu_splats((unsigned int)0x7F000000), exp_a), spu_cmpabsgt(mant_a, one)); - - /* The default multiplier is 1.0. If an underflow is detected (ie, - * either the dividend is a denorm/zero, or the computed exponent is - * less than or equal to a biased 0), force the multiplier to 0.0. - */ - mult = spu_and(one, (vector float)spu_cmpgt((vector signed int)(exp), 0)); - - /* Force the multiplier to positive Smax (0x7FFFFFFF) and the biased exponent - * to 127, if the divisor is denorm/zero or the computed biased exponent is - * greater than 255. - */ - mult = spu_or(mult, (vector float)spu_rlmask(spu_cmpeq(exp_a, 0), -1)); - - /* Insert the exponent into the result and perform the - * final multiplication. - */ - x1 = spu_sel(x1, (vector float)exp, exp_mask); - x1 = spu_mul(x1, mult); - - return (x1); -} - -#endif /* _RECIPF4_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/remainder.h b/newlib/libm/machine/spu/headers/remainder.h deleted file mode 100644 index bdcffa0d3..000000000 --- a/newlib/libm/machine/spu/headers/remainder.h +++ /dev/null @@ -1,192 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _REMAINDER_H_ -#define _REMAINDER_H_ 1 - -#include -#include "headers/vec_literal.h" - -static __inline double _remainder(double x, double y) -{ - int n, shift; - vec_uchar16 swap_words = VEC_LITERAL(vec_uchar16, 4,5,6,7, 0,1,2,3, 12,13,14,15, 8,9,10,11); - vec_uchar16 propagate = VEC_LITERAL(vec_uchar16, 4,5,6,7, 192,192,192,192, 12,13,14,15, 192,192,192,192); - vec_uchar16 splat_hi = VEC_LITERAL(vec_uchar16, 0,1,2,3,0,1,2,3, 8,9,10,11, 8,9,10,11); - vec_uchar16 splat_lo = VEC_LITERAL(vec_uchar16, 4,5,6,7,4,5,6,7, 12,13,14,15, 12,13,14,15); - vec_uint4 vx, vy, z; - vec_uint4 x_hi, y_hi, y_lo; - vec_uint4 abs_x, abs_y, abs_2x, abs_2y; - vec_uint4 exp_x, exp_y; - vec_uint4 zero_x, zero_y; - vec_uint4 logb_x, logb_y; - vec_uint4 mant_x, mant_y; - vec_uint4 normal, norm, denorm; - vec_uint4 gt, eq, bias, y2_hi; - vec_uint4 nan_out; - vec_uint4 result, result0, resultx, cnt, sign, borrow; - vec_uint4 exp_special = VEC_SPLAT_U32(0x7FF00000); - vec_uint4 half_smax = VEC_SPLAT_U32(0x7FEFFFFF); - vec_uint4 lsb = (vec_uint4)(VEC_SPLAT_U64(0x0000000000000001ULL)); - vec_uint4 sign_mask = (vec_uint4)(VEC_SPLAT_U64(0x8000000000000000ULL)); - vec_uint4 implied_1 = (vec_uint4)(VEC_SPLAT_U64(0x0010000000000000ULL)); - vec_uint4 mant_mask = (vec_uint4)(VEC_SPLAT_U64(0x000FFFFFFFFFFFFFULL)); - - vx = (vec_uint4)spu_promote(x, 0); - vy = (vec_uint4)spu_promote(y, 0); - - abs_x = spu_andc(vx, sign_mask); - abs_y = spu_andc(vy, sign_mask); - - abs_2y = spu_add(abs_y, implied_1); - - sign = spu_and(vx, sign_mask); - - - /* Compute abs_x = fmodf(abs_x, 2*abs_y). If y is greater than 0.5*SMAX (SMAX is the maximum - * representable float), then return abs_x. - */ - { - x_hi = spu_shuffle(abs_x, abs_x, splat_hi); - y_lo = spu_shuffle(abs_y, abs_y, splat_lo); - y_hi = spu_shuffle(abs_y, abs_y, splat_hi); - y2_hi = spu_shuffle(abs_2y, abs_2y, splat_hi); - - /* Force a NaN output if (1) abs_x is infinity or NaN or (2) - * abs_y is a NaN. - */ - nan_out = spu_or(spu_cmpgt(x_hi, half_smax), - spu_or(spu_cmpgt(y_hi, exp_special), - spu_and(spu_cmpeq(y_hi, exp_special), - spu_cmpgt(y_lo, 0)))); - - /* Determine ilogb of abs_x and abs_y and - * extract the mantissas (mant_x, mant_y) - */ - exp_x = spu_rlmask(x_hi, -20); - exp_y = spu_rlmask(y2_hi, -20); - - resultx = spu_or(spu_cmpgt(y2_hi, x_hi), spu_cmpgt(y_hi, half_smax)); - - zero_x = spu_cmpeq(exp_x, 0); - zero_y = spu_cmpeq(exp_y, 0); - - logb_x = spu_add(exp_x, -1023); - logb_y = spu_add(exp_y, -1023); - - mant_x = spu_andc(spu_sel(implied_1, abs_x, mant_mask), zero_x); - mant_y = spu_andc(spu_sel(implied_1, abs_2y, mant_mask), zero_y); - - /* Compute fixed point fmod of mant_x and mant_y. Set the flag, - * result0, to all ones if we detect that the final result is - * ever 0. - */ - result0 = spu_or(zero_x, zero_y); - - n = spu_extract(spu_sub(logb_x, logb_y), 0); - - while (n-- > 0) { - borrow = spu_genb(mant_x, mant_y); - borrow = spu_shuffle(borrow, borrow, propagate); - z = spu_subx(mant_x, mant_y, borrow); - - result0 = spu_or(spu_cmpeq(spu_or(z, spu_shuffle(z, z, swap_words)), 0), result0); - - mant_x = spu_sel(spu_slqw(mant_x, 1), spu_andc(spu_slqw(z, 1), lsb), spu_cmpgt((vec_int4)spu_shuffle(z, z, splat_hi), -1)); - } - - - borrow = spu_genb(mant_x, mant_y); - borrow = spu_shuffle(borrow, borrow, propagate); - z = spu_subx(mant_x, mant_y, borrow); - - mant_x = spu_sel(mant_x, z, spu_cmpgt((vec_int4)spu_shuffle(z, z, splat_hi), -1)); - mant_x = spu_andc(mant_x, VEC_LITERAL(vec_uint4, 0,0,-1,-1)); - - result0 = spu_or(spu_cmpeq(spu_or(mant_x, spu_shuffle(mant_x, mant_x, swap_words)), 0), result0); - - /* Convert the result back to floating point and restore - * the sign. If we flagged the result to be zero (result0), - * zero it. If we flagged the result to equal its input x, - * (resultx) then return x. - * - * Double precision generates a denorm for an output. - */ - cnt = spu_cntlz(mant_x); - cnt = spu_add(cnt, spu_and(spu_rlqwbyte(cnt, 4), spu_cmpeq(cnt, 32))); - cnt = spu_add(spu_shuffle(cnt, cnt, splat_hi), -11); - - shift = spu_extract(exp_y, 0) - 1; - denorm = spu_slqwbytebc(spu_slqw(mant_x, shift), shift); - - exp_y = spu_sub(exp_y, cnt); - - normal = spu_cmpgt((vec_int4)exp_y, 0); - - /* Normalize normal results, denormalize denorm results. - */ - shift = spu_extract(cnt, 0); - norm = spu_slqwbytebc(spu_slqw(spu_andc(mant_x, VEC_LITERAL(vec_uint4, 0x00100000, 0, -1, -1)), shift), shift); - - mant_x = spu_sel(denorm, norm, normal); - - exp_y = spu_and(spu_rl(exp_y, 20), normal); - - result = spu_sel(exp_y, mant_x, mant_mask); - - abs_x = spu_sel(spu_andc(result, spu_rlmask(result0, -1)), abs_x, resultx); - - } - - /* if (2*x > y) - * x -= y - * if (2*x >= y) x -= y - */ - abs_2x = spu_and(spu_add(abs_x, implied_1), normal); - - gt = spu_cmpgt(abs_2x, abs_y); - eq = spu_cmpeq(abs_2x, abs_y); - bias = spu_or(gt, spu_and(eq, spu_rlqwbyte(gt, 4))); - bias = spu_shuffle(bias, bias, splat_hi); - abs_x = spu_sel(abs_x, (vec_uint4)spu_sub((vec_double2)abs_x, (vec_double2)abs_y), bias); - - bias = spu_andc(bias, spu_rlmaska((vec_uint4)spu_msub((vec_double2)abs_x, VEC_SPLAT_F64(2.0), (vec_double2)abs_y), -31)); - bias = spu_shuffle(bias, bias, splat_hi); - abs_x = spu_sel(abs_x, (vec_uint4)spu_sub((vec_double2)abs_x, (vec_double2)abs_y), bias); - - /* Generate a correct final sign - */ - result = spu_sel(spu_xor(abs_x, sign), exp_special, nan_out); - - return (spu_extract((vec_double2)result, 0)); -} -#endif /* _REMAINDER_H_ */ diff --git a/newlib/libm/machine/spu/headers/remainderf.h b/newlib/libm/machine/spu/headers/remainderf.h deleted file mode 100644 index b610b673e..000000000 --- a/newlib/libm/machine/spu/headers/remainderf.h +++ /dev/null @@ -1,141 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _REMAINDERF_H_ -#define _REMAINDERF_H_ 1 - -#include -#include "headers/vec_literal.h" - -static __inline float _remainderf(float x, float y) -{ - int n; - vec_uint4 vx, vy, z; - vec_uint4 abs_x, abs_y, abs_2x, abs_2y; - vec_uint4 exp_x, exp_y; - vec_uint4 zero_x, zero_y; - vec_uint4 logb_x, logb_y; - vec_uint4 mant_x, mant_y; - vec_uint4 result, result0, resultx, cnt, sign, bias; - vec_uint4 sign_mask = VEC_SPLAT_U32(0x80000000); - vec_uint4 implied_1 = VEC_SPLAT_U32(0x00800000); - vec_uint4 mant_mask = VEC_SPLAT_U32(0x007FFFFF); - vec_float4 two = { 2.0f, 2.0f, 2.0f, 2.0f }; - - vx = (vec_uint4)spu_promote(x, 0); - vy = (vec_uint4)spu_promote(y, 0); - - abs_x = spu_andc(vx, sign_mask); - abs_y = spu_andc(vy, sign_mask); - - abs_2y = spu_add(abs_y, implied_1); /* abs_2y = 2 * abs_y */ - - sign = spu_and(vx, sign_mask); - - /* Compute abs_x = fmodf(abs_x, 2*abs_y). If y is greater than 0.5*SMAX - * (SMAX is the maximum representable float), then return abs_x. - */ - { - /* Determine ilogb of abs_x and abs_2y and - * extract the mantissas (mant_x, mant_y) - */ - exp_x = spu_rlmask(abs_x, -23); - exp_y = spu_rlmask(abs_2y, -23); - - resultx = spu_or(spu_cmpgt(abs_2y, abs_x), spu_cmpgt(abs_y, VEC_SPLAT_U32(0x7F7FFFFF))); - - zero_x = spu_cmpeq(exp_x, 0); - zero_y = spu_cmpeq(exp_y, 0); - - logb_x = spu_add(exp_x, -127); - logb_y = spu_add(exp_y, -127); - - mant_x = spu_andc(spu_sel(implied_1, abs_x, mant_mask), zero_x); - mant_y = spu_andc(spu_sel(implied_1, abs_2y, mant_mask), zero_y); - - /* Compute fixed point fmod of mant_x and mant_y. Set the flag, - * result0, to all ones if we detect that the final result is - * ever 0. - */ - result0 = spu_or(zero_x, zero_y); - - n = spu_extract(spu_sub(logb_x, logb_y), 0); - - - while (n-- > 0) { - z = spu_sub(mant_x, mant_y); - - result0 = spu_or(spu_cmpeq(z, 0), result0); - - mant_x = spu_sel(spu_add(mant_x, mant_x), spu_add(z, z), - spu_cmpgt((vec_int4)z, -1)); - } - - z = spu_sub(mant_x, mant_y); - mant_x = spu_sel(mant_x, z, spu_cmpgt((vec_int4)z, -1)); - - result0 = spu_or(spu_cmpeq(mant_x, 0), result0); - - /* Convert the result back to floating point and restore - * the sign. If we flagged the result to be zero (result0), - * zero it. If we flagged the result to equal its input x, - * (resultx) then return x. - */ - cnt = spu_add(spu_cntlz(mant_x), -8); - - mant_x = spu_rl(spu_andc(mant_x, implied_1), (vec_int4)cnt); - - exp_y = spu_sub(exp_y, cnt); - result0 = spu_orc(result0, spu_cmpgt((vec_int4)exp_y, 0)); /* zero denorm results */ - exp_y = spu_rl(exp_y, 23); - - result = spu_sel(exp_y, mant_x, mant_mask); - abs_x = spu_sel(spu_andc(result, spu_rlmask(result0, -1)), abs_x, resultx); - } - - /* if (2*x > y) - * x -= y - * if (2*x >= y) x -= y - */ - abs_2x = spu_add(abs_x, implied_1); - bias = spu_cmpgt(abs_2x, abs_y); - abs_x = spu_sel(abs_x, (vec_uint4)spu_sub((vec_float4)abs_x, (vec_float4)abs_y), bias); - bias = spu_andc(bias, spu_rlmaska((vec_uint4)spu_msub((vec_float4)abs_x, two, (vec_float4)abs_y), -31)); - abs_x = spu_sel(abs_x, (vec_uint4)spu_sub((vec_float4)abs_x, (vec_float4)abs_y), bias); - - /* Generate a correct final sign - */ - result = spu_xor(abs_x, sign); - - return (spu_extract((vec_float4)result, 0)); -} -#endif /* _REMAINDERF_H_ */ diff --git a/newlib/libm/machine/spu/headers/remquo.h b/newlib/libm/machine/spu/headers/remquo.h deleted file mode 100644 index fd6a5aae6..000000000 --- a/newlib/libm/machine/spu/headers/remquo.h +++ /dev/null @@ -1,239 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _REMQUO_H_ -#define _REMQUO_H_ 1 - -#include -#include "headers/vec_literal.h" - -static __inline double _remquo(double x, double y, int *quo) -{ - int n, shift; - vec_uchar16 swap_words = VEC_LITERAL(vec_uchar16, 4,5,6,7, 0,1,2,3, 12,13,14,15, 8,9,10,11); - vec_uchar16 propagate = VEC_LITERAL(vec_uchar16, 4,5,6,7, 192,192,192,192, 12,13,14,15, 192,192,192,192); - vec_uchar16 splat_hi = VEC_LITERAL(vec_uchar16, 0,1,2,3,0,1,2,3, 8,9,10,11, 8,9,10,11); - vec_uchar16 splat_lo = VEC_LITERAL(vec_uchar16, 4,5,6,7,4,5,6,7, 12,13,14,15, 12,13,14,15); - vec_int4 quotient; - vec_int4 four = { 4, 4, 4, 4 }; - vec_uint4 vx, vy, z; - vec_uint4 x_hi, y_hi, y8_hi, y_lo, y2, y4; - vec_uint4 abs_x, abs_y, abs_2x, abs_2y, abs_8y; - vec_uint4 exp_x, exp_y; - vec_uint4 zero_x, zero_y; - vec_uint4 logb_x, logb_y; - vec_uint4 mant_x, mant_y; - vec_uint4 normal, norm, denorm; - vec_uint4 gt, eq, bias; - vec_uint4 nan_out, not_ge, quo_pos, overflow; - vec_uint4 result, result0, resultx, cnt, sign, borrow; - vec_uint4 exp_special = VEC_SPLAT_U32(0x7FF00000); - vec_uint4 half_smax = VEC_SPLAT_U32(0x7FEFFFFF); - vec_uint4 lsb = (vec_uint4)(VEC_SPLAT_U64(0x0000000000000001ULL)); - vec_uint4 sign_mask = (vec_uint4)(VEC_SPLAT_U64(0x8000000000000000ULL)); - vec_uint4 implied_1 = (vec_uint4)(VEC_SPLAT_U64(0x0010000000000000ULL)); - vec_uint4 mant_mask = (vec_uint4)(VEC_SPLAT_U64(0x000FFFFFFFFFFFFFULL)); - - vx = (vec_uint4)spu_promote(x, 0); - vy = (vec_uint4)spu_promote(y, 0); - - abs_x = spu_andc(vx, sign_mask); - abs_y = spu_andc(vy, sign_mask); - - abs_2y = spu_add(abs_y, implied_1); - abs_8y = spu_add(abs_y, VEC_LITERAL(vec_uint4, 0x00300000, 0, 0x00300000, 0)); - - sign = spu_and(vx, sign_mask); - - quo_pos = spu_cmpgt((vec_int4)spu_and(spu_xor(vx, vy), sign_mask), -1); - quo_pos = spu_shuffle(quo_pos, quo_pos, splat_hi); - - /* Compute abs_x = fmodf(abs_x, 8*abs_y). If y is greater than 0.125*SMAX - * (SMAX is the maximum representable float), then return abs_x. - */ - { - x_hi = spu_shuffle(abs_x, abs_x, splat_hi); - y_lo = spu_shuffle(abs_y, abs_y, splat_lo); - y_hi = spu_shuffle(abs_y, abs_y, splat_hi); - y8_hi = spu_shuffle(abs_8y, abs_8y, splat_hi); - - /* Force a NaN output if (1) abs_x is infinity or NaN or (2) - * abs_y is a NaN. - */ - nan_out = spu_or(spu_cmpgt(x_hi, half_smax), - spu_or(spu_cmpgt(y_hi, exp_special), - spu_and(spu_cmpeq(y_hi, exp_special), - spu_cmpgt(y_lo, 0)))); - - /* Determine ilogb of abs_x and abs_8y and - * extract the mantissas (mant_x, mant_y) - */ - exp_x = spu_rlmask(x_hi, -20); - exp_y = spu_rlmask(y8_hi, -20); - - resultx = spu_or(spu_cmpgt(y8_hi, x_hi), spu_cmpgt(y_hi, half_smax)); - - zero_x = spu_cmpeq(exp_x, 0); - zero_y = spu_cmpeq(exp_y, 0); - - logb_x = spu_add(exp_x, -1023); - logb_y = spu_add(exp_y, -1023); - - mant_x = spu_andc(spu_sel(implied_1, abs_x, mant_mask), zero_x); - mant_y = spu_andc(spu_sel(implied_1, abs_8y, mant_mask), zero_y); - - /* Compute fixed point fmod of mant_x and mant_y. Set the flag, - * result0, to all ones if we detect that the final result is - * ever 0. - */ - result0 = spu_or(zero_x, zero_y); - - n = spu_extract(spu_sub(logb_x, logb_y), 0); - - while (n-- > 0) { - borrow = spu_genb(mant_x, mant_y); - borrow = spu_shuffle(borrow, borrow, propagate); - z = spu_subx(mant_x, mant_y, borrow); - - result0 = spu_or(spu_cmpeq(spu_or(z, spu_shuffle(z, z, swap_words)), 0), result0); - - mant_x = spu_sel(spu_slqw(mant_x, 1), spu_andc(spu_slqw(z, 1), lsb), spu_cmpgt((vec_int4)spu_shuffle(z, z, splat_hi), -1)); - } - - - borrow = spu_genb(mant_x, mant_y); - borrow = spu_shuffle(borrow, borrow, propagate); - z = spu_subx(mant_x, mant_y, borrow); - - mant_x = spu_sel(mant_x, z, spu_cmpgt((vec_int4)spu_shuffle(z, z, splat_hi), -1)); - mant_x = spu_andc(mant_x, VEC_LITERAL(vec_uint4, 0,0,-1,-1)); - - result0 = spu_or(spu_cmpeq(spu_or(mant_x, spu_shuffle(mant_x, mant_x, swap_words)), 0), result0); - - /* Convert the result back to floating point and restore - * the sign. If we flagged the result to be zero (result0), - * zero it. If we flagged the result to equal its input x, - * (resultx) then return x. - * - * Double precision generates a denorm for an output. - */ - cnt = spu_cntlz(mant_x); - cnt = spu_add(cnt, spu_and(spu_rlqwbyte(cnt, 4), spu_cmpeq(cnt, 32))); - cnt = spu_add(spu_shuffle(cnt, cnt, splat_hi), -11); - - shift = spu_extract(exp_y, 0) - 1; - denorm = spu_slqwbytebc(spu_slqw(mant_x, shift), shift); - - exp_y = spu_sub(exp_y, cnt); - - normal = spu_cmpgt((vec_int4)exp_y, 0); - - /* Normalize normal results, denormalize denorm results. - */ - shift = spu_extract(cnt, 0); - norm = spu_slqwbytebc(spu_slqw(spu_andc(mant_x, VEC_LITERAL(vec_uint4, 0x00100000, 0, -1, -1)), shift), shift); - - mant_x = spu_sel(denorm, norm, normal); - - exp_y = spu_and(spu_rl(exp_y, 20), normal); - - result = spu_sel(exp_y, mant_x, mant_mask); - - abs_x = spu_sel(spu_andc(result, spu_rlmask(result0, -1)), abs_x, resultx); - - } - - /* if (x >= 4*y) - * x -= 4*y - * quotient = 4 - * else - * quotient = 0 - */ - y4 = spu_andc(spu_add(abs_y, spu_rl(implied_1, 1)), zero_y); - - overflow = spu_cmpgt(y_hi, VEC_SPLAT_U32(0x7FCFFFFF)); - gt = spu_cmpgt(y4, abs_x); - eq = spu_cmpeq(y4, abs_x); - not_ge = spu_or(gt, spu_and(eq, spu_rlqwbyte(gt, 4))); - not_ge = spu_shuffle(not_ge, not_ge, splat_hi); - not_ge = spu_or(not_ge, overflow); - - abs_x = spu_sel((vec_uint4)spu_sub((vec_double2)abs_x, (vec_double2)y4), abs_x, not_ge); - quotient = spu_andc(four, (vec_int4)not_ge); - - /* if (x >= 2*y - * x -= 2*y - * quotient += 2 - */ - y2 = spu_andc(spu_add(abs_y, implied_1), zero_y); - - overflow = spu_cmpgt(y_hi, VEC_SPLAT_U32(0x7FDFFFFF)); - gt = spu_cmpgt(y2, abs_x); - eq = spu_cmpeq(y2, abs_x); - not_ge = spu_or(gt, spu_and(eq, spu_rlqwbyte(gt, 4))); - not_ge = spu_shuffle(not_ge, not_ge, splat_hi); - not_ge = spu_or(not_ge, overflow); - - - abs_x = spu_sel((vec_uint4)spu_sub((vec_double2)abs_x, (vec_double2)y2), abs_x, not_ge); - quotient = spu_sel(spu_add(quotient, 2), quotient, not_ge); - - /* if (2*x > y) - * x -= y - * if (2*x >= y) x -= y - */ - abs_2x = spu_and(spu_add(abs_x, implied_1), normal); - - gt = spu_cmpgt(abs_2x, abs_y); - eq = spu_cmpeq(abs_2x, abs_y); - bias = spu_or(gt, spu_and(eq, spu_rlqwbyte(gt, 4))); - bias = spu_shuffle(bias, bias, splat_hi); - abs_x = spu_sel(abs_x, (vec_uint4)spu_sub((vec_double2)abs_x, (vec_double2)abs_y), bias); - quotient = spu_sub(quotient, (vec_int4)bias); - - bias = spu_andc(bias, spu_rlmaska((vec_uint4)spu_msub((vec_double2)abs_x, VEC_SPLAT_F64(2.0), (vec_double2)abs_y), -31)); - bias = spu_shuffle(bias, bias, splat_hi); - abs_x = spu_sel(abs_x, (vec_uint4)spu_sub((vec_double2)abs_x, (vec_double2)abs_y), bias); - quotient = spu_sub(quotient, (vec_int4)bias); - - /* Generate a correct final sign - */ - result = spu_sel(spu_xor(abs_x, sign), exp_special, nan_out); - - quotient = spu_and(quotient, 7); - quotient = spu_sel(spu_sub(0, quotient), quotient, quo_pos); - - *quo = spu_extract(quotient, 0); - - return (spu_extract((vec_double2)result, 0)); -} -#endif /* _REMQUO_H_ */ diff --git a/newlib/libm/machine/spu/headers/remquof.h b/newlib/libm/machine/spu/headers/remquof.h deleted file mode 100644 index c48172856..000000000 --- a/newlib/libm/machine/spu/headers/remquof.h +++ /dev/null @@ -1,178 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _REMQUOF_H_ -#define _REMQUOF_H_ 1 - -#include -#include "headers/vec_literal.h" - - -static __inline float _remquof(float x, float y, int *quo) -{ - int n; - vec_int4 quotient; - vec_int4 four = { 4, 4, 4, 4 }; - vec_uint4 vx, vy, z, y2, y4; - vec_uint4 abs_x, abs_y, abs_2x, abs_8y; - vec_uint4 exp_x, exp_y; - vec_uint4 zero_x, zero_y; - vec_uint4 logb_x, logb_y; - vec_uint4 mant_x, mant_y; - vec_uint4 not_ge, overflow, quo_pos; - vec_uint4 result, result0, resultx, cnt, sign, bias; - vec_uint4 sign_mask = VEC_SPLAT_U32(0x80000000); - vec_uint4 implied_1 = VEC_SPLAT_U32(0x00800000); - vec_uint4 mant_mask = VEC_SPLAT_U32(0x007FFFFF); - - vx = (vec_uint4)spu_promote(x, 0); - vy = (vec_uint4)spu_promote(y, 0); - - abs_x = spu_andc(vx, sign_mask); - abs_y = spu_andc(vy, sign_mask); - - abs_8y = spu_add(abs_y, VEC_SPLAT_U32(0x01800000)); /* abs_2y = 8 * abs_y */ - - sign = spu_and(vx, sign_mask); - - quo_pos = spu_cmpgt((vec_int4)spu_and(spu_xor(vx, vy), sign_mask), -1); - - /* Compute abs_x = fmodf(abs_x, 8*abs_y). If y is greater than 0.125*SMAX - * (SMAX is the maximum representable float), then return abs_x. - */ - { - /* Determine ilogb of abs_x and abs_8y and - * extract the mantissas (mant_x, mant_y) - */ - exp_x = spu_rlmask(abs_x, -23); - exp_y = spu_rlmask(abs_8y, -23); - - resultx = spu_or(spu_cmpgt(abs_8y, abs_x), spu_cmpgt(abs_y, VEC_SPLAT_U32(0x7E7FFFFF))); - - zero_x = spu_cmpeq(exp_x, 0); - zero_y = spu_cmpeq(exp_y, 0); - - logb_x = spu_add(exp_x, -127); - logb_y = spu_add(exp_y, -127); - - mant_x = spu_andc(spu_sel(implied_1, abs_x, mant_mask), zero_x); - mant_y = spu_andc(spu_sel(implied_1, abs_8y, mant_mask), zero_y); - - /* Compute fixed point fmod of mant_x and mant_y. Set the flag, - * result0, to all ones if we detect that the final result is - * ever 0. - */ - result0 = spu_or(zero_x, zero_y); - - n = spu_extract(spu_sub(logb_x, logb_y), 0); - - - while (n-- > 0) { - z = spu_sub(mant_x, mant_y); - - result0 = spu_or(spu_cmpeq(z, 0), result0); - - mant_x = spu_sel(spu_add(mant_x, mant_x), spu_add(z, z), - spu_cmpgt((vec_int4)z, -1)); - } - - z = spu_sub(mant_x, mant_y); - mant_x = spu_sel(mant_x, z, spu_cmpgt((vec_int4)z, -1)); - - result0 = spu_or(spu_cmpeq(mant_x, 0), result0); - - /* Convert the result back to floating point and restore - * the sign. If we flagged the result to be zero (result0), - * zero it. If we flagged the result to equal its input x, - * (resultx) then return x. - */ - cnt = spu_add(spu_cntlz(mant_x), -8); - - mant_x = spu_rl(spu_andc(mant_x, implied_1), (vec_int4)cnt); - - exp_y = spu_sub(exp_y, cnt); - result0 = spu_orc(result0, spu_cmpgt((vec_int4)exp_y, 0)); /* zero denorm results */ - exp_y = spu_rl(exp_y, 23); - - result = spu_sel(exp_y, mant_x, mant_mask); - abs_x = spu_sel(spu_andc(result, spu_rlmask(result0, -1)), abs_x, resultx); - } - - /* if (x >= 4*y) - * x -= 4*y - * quotient = 4 - * else - * quotient = 0 - */ - y4 = spu_andc(spu_add(abs_y, VEC_SPLAT_U32(0x01000000)), zero_y); - - overflow = spu_cmpgt(abs_y, VEC_SPLAT_U32(0x7EFFFFFF)); - not_ge = spu_or(spu_cmpgt(y4, abs_x), overflow); - - abs_x = spu_sel((vec_uint4)spu_sub((vec_float4)abs_x, (vec_float4)y4), abs_x, not_ge); - quotient = spu_andc (four, (vec_int4)not_ge); - - /* if (x >= 2*y - * x -= 2*y - * quotient += 2 - */ - y2 = spu_andc(spu_add(abs_y, implied_1), zero_y); - not_ge = spu_cmpgt(y2, abs_x); - - abs_x = spu_sel((vec_uint4)spu_sub((vec_float4)abs_x, (vec_float4)y2), abs_x, not_ge); - quotient = spu_sel(spu_add(quotient, 2), quotient, not_ge); - - /* if (2*x > y) - * x -= y - * if (2*x >= y) x -= y - */ - abs_2x = spu_add(abs_x, implied_1); - bias = spu_cmpgt(abs_2x, abs_y); - abs_x = spu_sel(abs_x, (vec_uint4)spu_sub((vec_float4)abs_x, (vec_float4)abs_y), bias); - quotient = spu_sub(quotient, (vec_int4)bias); - - bias = spu_andc(bias, spu_rlmaska((vec_uint4)spu_msub((vec_float4)abs_x, VEC_SPLAT_F32(2.0f), (vec_float4)abs_y), -31)); - abs_x = spu_sel(abs_x, (vec_uint4)spu_sub((vec_float4)abs_x, (vec_float4)abs_y), bias); - quotient = spu_sub(quotient, (vec_int4)bias); - - /* Generate a correct final sign - */ - result = spu_xor(abs_x, sign); - - quotient = spu_and(quotient, 7); - quotient = spu_sel(spu_sub(0, quotient), quotient, quo_pos); - - *quo = spu_extract(quotient, 0); - - return (spu_extract((vec_float4)result, 0)); -} -#endif /* _REMQUOF_H_ */ diff --git a/newlib/libm/machine/spu/headers/rint.h b/newlib/libm/machine/spu/headers/rint.h deleted file mode 100644 index 7cf7adcfa..000000000 --- a/newlib/libm/machine/spu/headers/rint.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _RINT_H_ -#define _RINT_H_ 1 - -#include -#include "headers/vec_literal.h" - -/* Round the input to the nearest integer according to the current - * rounding mode. - */ -static __inline double _rint(double x) -{ - vec_ullong2 sign = VEC_SPLAT_U64(0x8000000000000000ULL); - vec_double2 in, out, addend; - - in = spu_promote(x, 0); - - /* Add 2^53 and then subtract 2^53 to affect a round to be performed by the - * hardware. Also preserve the input sign so that negative inputs that - * round to zero generate a -0.0. - */ - addend = spu_sel((vec_double2)(VEC_SPLAT_U64(0x4330000000000000ULL)), - in, sign); - out = spu_sel(spu_sub(spu_add(in, addend), addend), in, sign); - - return (spu_extract(out, 0)); -} -#endif /* _RINT_H_ */ diff --git a/newlib/libm/machine/spu/headers/rintf.h b/newlib/libm/machine/spu/headers/rintf.h deleted file mode 100644 index 4649b0f38..000000000 --- a/newlib/libm/machine/spu/headers/rintf.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/rintf4.h" - -static __inline float _rintf(float x) -{ - return spu_extract(_rintf4(spu_promote(x, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/rintf4.h b/newlib/libm/machine/spu/headers/rintf4.h deleted file mode 100644 index 11e3534c6..000000000 --- a/newlib/libm/machine/spu/headers/rintf4.h +++ /dev/null @@ -1,74 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _RINTF4_H_ -#define _RINTF4_H_ 1 - -#include "truncf4.h" - -/* - * FUNCTION - * vector float _rintf4(vector float x) - * - * DESCRIPTION - * The SPU doesn't support directed rounding. Within the simdmath - * library, rintf4 is aliased to truncf4. This header merely - * provides inlinable compatibility - * - */ -static __inline vector float _rintf4(vector float x) -{ - return _truncf4(x); -} -#endif /* _RINTF4_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/round.h b/newlib/libm/machine/spu/headers/round.h deleted file mode 100644 index 0943218b6..000000000 --- a/newlib/libm/machine/spu/headers/round.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _ROUND_H_ -#define _ROUND_H_ 1 - -#include -#include "headers/vec_literal.h" - -/* Round the input to the nearest integer, rounding halfway - * cases away from zero. - */ -static __inline double _round(double x) -{ - vec_uchar16 splat_hi = VEC_LITERAL(vec_uchar16, 0,1,2,3,0,1,2,3, 8,9,10,11, 8,9,10,11); - vec_int4 exp, shift; - vec_uint4 sign = VEC_LITERAL(vec_uint4, 0x80000000, 0, 0x80000000, 0); - vec_uint4 or_mask, and_mask, mask, addend; - vec_double2 in, in_hi, out; - - in = spu_promote(x, 0); - - /* Add 0.5 (fixed precision to eliminate rounding issues) - */ - in_hi = spu_shuffle(in, in, splat_hi); - exp = spu_and(spu_rlmask((vec_int4)in_hi, -20), 0x7FF); - - shift = spu_sub(VEC_LITERAL(vec_int4, 1022, 1043, 1022, 1043), exp); - - addend = spu_and(spu_rlmask(VEC_LITERAL(vec_uint4, 0x100000, 0x80000000, - 0x100000, 0x80000000), shift), - spu_cmpgt((vec_uint4)spu_add(shift, -1), -33)); - - in = (vec_double2)spu_addx((vec_uint4)in, addend, - spu_rlqwbyte(spu_genc((vec_uint4)in, addend), 4)); - - /* Truncate the result. - */ - in_hi = spu_shuffle(in, in, splat_hi); - exp = spu_and(spu_rlmask((vec_int4)in_hi, -20), 0x7FF); - - shift = spu_sub(VEC_LITERAL(vec_int4, 1023, 1043, 1023, 1043), exp); - or_mask = spu_andc(spu_cmpgt(shift, 0), sign); - - - and_mask = spu_rlmask(VEC_LITERAL(vec_uint4, 0xFFFFF, -1, 0xFFFFF, -1), - shift); - mask = spu_or(spu_and(and_mask, spu_cmpgt(shift, -31)), or_mask); - - /* Apply the mask and return the result. - */ - out = spu_andc(in, (vec_double2)(mask)); - - return (spu_extract(out, 0)); -} -#endif /* _ROUND_H_ */ diff --git a/newlib/libm/machine/spu/headers/roundf.h b/newlib/libm/machine/spu/headers/roundf.h deleted file mode 100644 index 16914d6f9..000000000 --- a/newlib/libm/machine/spu/headers/roundf.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _ROUNDF_H_ -#define _ROUNDF_H_ 1 - -#include -#include "headers/vec_literal.h" - -/* Round the input to the nearest integer, rounding halfway - * cases away from zero. - */ -static __inline float _roundf(float x) -{ - vec_int4 exp; - vec_uint4 or_mask, and_mask, mask, addend; - vec_float4 in, out; - - in = spu_promote(x, 0); - - /* Add 0.5 (fixed precision to eliminate rounding issues) - */ - exp = spu_sub(125, spu_and(spu_rlmask((vec_int4)in, -23), 0xFF)); - - addend = spu_and(spu_rlmask(VEC_SPLAT_U32(0x1000000), exp), - spu_cmpgt((vec_uint4)exp, -31)); - - in = (vec_float4)spu_add((vec_uint4)in, addend); - - /* Truncate the result. - */ - exp = spu_sub(127, spu_and(spu_rlmask((vec_int4)in, -23), 0xFF)); - - or_mask = spu_cmpgt(exp, 0); - and_mask = spu_rlmask(VEC_SPLAT_U32(0x7FFFFF), exp); - - mask = spu_or(spu_and(and_mask, spu_cmpgt(exp, -31)), or_mask); - - out = spu_andc(in, (vec_float4)(mask)); - - return (spu_extract(out, 0)); -} -#endif /* _ROUNDF_H_ */ diff --git a/newlib/libm/machine/spu/headers/scalbn.h b/newlib/libm/machine/spu/headers/scalbn.h deleted file mode 100644 index 65802b635..000000000 --- a/newlib/libm/machine/spu/headers/scalbn.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _SCALBN_H_ -#define _SCALBN_H_ 1 - -#include -#include "headers/vec_literal.h" - -/* scalbn computes x * 2^exp. This function variant computes the result - * and handles overflow, underflow, and denorms by breaking the problem - * into: - * exp = MAX(exp, -2044) - * exp = MIN(exp, 2046) - * e1 = exp / 2 - * e2 = exp - e1; - * x * 2^e1 * 2^e2 - */ -static __inline double _scalbn(double x, int exp) -{ - vec_int4 e, e1, e2; - vec_int4 min = VEC_SPLAT_S32(-2044); - vec_int4 max = VEC_SPLAT_S32(2046); - vec_uint4 cmp_min, cmp_max; - vec_uint4 shift = VEC_LITERAL(vec_uint4, 20, 32, 20, 32); - vec_double2 f1, f2; - vec_double2 in, out; - - in = spu_promote(x, 0); - e = spu_promote(exp, 0); - - /* Clamp the specified exponent to the range -2044 to 2046. - */ - cmp_min = spu_cmpgt(e, min); - cmp_max = spu_cmpgt(e, max); - e = spu_sel(min, e, cmp_min); - e = spu_sel(e, max, cmp_max); - - /* Generate the factors f1 = 2^e1 and f2 = 2^e2 - */ - e1 = spu_rlmaska(e, -1); - e2 = spu_sub(e, e1); - - f1 = (vec_double2)spu_sl(spu_add(e1, 1023), shift); - f2 = (vec_double2)spu_sl(spu_add(e2, 1023), shift); - - /* Compute the product x * 2^e1 * 2^e2 - */ - out = spu_mul(spu_mul(in, f1), f2); - - return (spu_extract(out, 0)); -} -#endif /* _SCALBN_H_ */ diff --git a/newlib/libm/machine/spu/headers/scalbnf.h b/newlib/libm/machine/spu/headers/scalbnf.h deleted file mode 100644 index 56ed1ef87..000000000 --- a/newlib/libm/machine/spu/headers/scalbnf.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _SCALBNF_H_ -#define _SCALBNF_H_ 1 - -#include -#include "headers/vec_literal.h" - -/* scalbnf computes x * 2^exp. This function is computed without - * the assistence of any floating point operations and as such does - * not set any floating point exceptions. - */ -static __inline float _scalbnf(float x, int exp) -{ - vec_int4 x_exp; - vec_uint4 zero, overflow; - vec_uint4 exp_mask = VEC_SPLAT_U32(0x7F800000); - vec_float4 in, out; - - in = spu_promote(x, 0); - - /* Extract exponent from x. If the exponent is 0, then - * x is either 0 or a denorm and x*2^exp is a zero. - */ - x_exp = spu_and(spu_rlmask((vec_int4)in, -23), 0xFF); - - zero = spu_cmpeq(x_exp, 0); - - /* Compute the expected exponent and determine if the - * result is within range. - */ - x_exp = spu_add(spu_promote(exp, 0), x_exp); - - zero = spu_orc(zero, spu_cmpgt(x_exp, 0)); - - overflow = spu_rlmask(spu_cmpgt(x_exp, 255), -1); - - /* Merge the expect exponent with x's mantissa. Zero the - * result if underflow and force to max if overflow. - */ - out = spu_sel(in, (vec_float4)spu_rl(x_exp, 23), exp_mask); - out = spu_andc(out, (vec_float4)zero); - out = spu_or(out, (vec_float4)overflow); - - return (spu_extract(out, 0)); -} -#endif /* _SCALBNF_H_ */ diff --git a/newlib/libm/machine/spu/headers/scalbnf4.h b/newlib/libm/machine/spu/headers/scalbnf4.h deleted file mode 100644 index 718a8f9f9..000000000 --- a/newlib/libm/machine/spu/headers/scalbnf4.h +++ /dev/null @@ -1,113 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _SCALBNF4_H_ -#define _SCALBNF4_H_ 1 - -#include - -/* - * FUNCTION - * vector float _scalbnf4(vector float x, vector signed int exp) - * - * DESCRIPTION - * The _scalbnf4 function returns a vector containing each element of x - * multiplied by 2^n computed efficiently. This function is computed - * without the assistance of any floating point operations and as such - * does not set any floating point exceptions. - * - * Special Cases: - * - if the exponent is 0, then x is either 0 or a subnormal, and the - * result will be returned as 0. - * - if the result if underflows, it will be returned as 0. - * - if the result overflows, it will be returned as FLT_MAX. - * - */ -static __inline vector float _scalbnf4(vector float x, vector signed int exp) -{ - vec_int4 x_exp; - vec_uint4 zero; - vec_uint4 overflow; - vec_uint4 exp_mask = (vec_uint4)spu_splats(0x7F800000); - vec_float4 out; - - /* Extract exponent from x. If the exponent is 0, then - * x is either 0 or a denorm and x*2^exp is a zero. - */ - x_exp = spu_and(spu_rlmask((vec_int4)x, -23), 0xFF); - zero = spu_cmpeq(x_exp, 0); - - /* Compute the expected exponent and determine if the - * result is within range. - */ - x_exp = spu_add(exp, x_exp); - - /* Check for zero or overflow of result. - * Note: set high bit of flags = 0, since we have to - * return -0 when x = -0 - */ - zero = spu_rlmask(spu_orc(zero, spu_cmpgt(x_exp, 0)), -1); - overflow = spu_rlmask(spu_cmpgt(x_exp, 255), -1); - - /* Merge the expect exponent with x's mantissa. Zero the - * result if underflow and force to max if overflow. - */ - out = spu_sel(x, (vec_float4)spu_rl(x_exp, 23), exp_mask); - out = spu_andc(out, (vec_float4)zero); - out = spu_or(out, (vec_float4)overflow); - - return out; -} - -#endif /* _SCALBNF4_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/signbit.h b/newlib/libm/machine/spu/headers/signbit.h deleted file mode 100644 index b27fce235..000000000 --- a/newlib/libm/machine/spu/headers/signbit.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/signbitd2.h" - -static __inline unsigned long long _signbit(double x) -{ - return spu_extract(_signbitd2(spu_promote(x, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/signbitd2.h b/newlib/libm/machine/spu/headers/signbitd2.h deleted file mode 100644 index e1c955a05..000000000 --- a/newlib/libm/machine/spu/headers/signbitd2.h +++ /dev/null @@ -1,86 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _SIGNBITD2_H_ -#define _SIGNBITD2_H_ 1 - -#include - -/* - * FUNCTION - * vector unsigned long long _signbitd2(vector double x) - * - * DESCRIPTION - * The signbitd2 function returns a vector which contains either all ones - * or all zeros, depending on the sign of the corresponding input vector - * element. - * - * Note that the signbit functions are not logically equivalent to - * x < 0.0. IEEE 754 floating point rules include a signed zero, so if - * the input value is –0.0, signbit will return non-zero, but the naive - * implementation will not. - * - * RETURNS - * The function signbitf4 returns an unsigned int vector in which each - * element is defined as: - * - * - ULLONG_MAX (0xFFFFFFFFFFFFFFFF) if the sign bit is set for the - * corresponding element of x - * - 0 (0x0000000000000000) otherwise. - * - */ -static __inline vector unsigned long long _signbitd2(vector double x) -{ - vec_uchar16 shuf = ((vec_uchar16){0, 1, 2, 3, 0, 1, 2, 3, 8, 9, 10, 11, 8, 9, 10, 11}); - vec_uint4 r = spu_rlmaska((vec_uint4)x,-31); - return (vec_ullong2)spu_shuffle(r,r,shuf); -} -#endif /* _SIGNBITD2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/simdmath.h b/newlib/libm/machine/spu/headers/simdmath.h deleted file mode 100644 index bba8debd1..000000000 --- a/newlib/libm/machine/spu/headers/simdmath.h +++ /dev/null @@ -1,278 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifndef __SIMD_MATH_H__ -#define __SIMD_MATH_H__ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -#if !defined(__SPU__) && !defined(__ALTIVEC__) -#error Bad platform -#else - -#define SM_E 2.7182818284590452354 /* e */ -#define SM_LOG2E 1.4426950408889634074 /* log_2 e */ -#define SM_LOG10E 0.43429448190325182765 /* log_10 e */ -#define SM_LN2 0.69314718055994530942 /* log_e 2 */ -#define SM_LN10 2.30258509299404568402 /* log_e 10 */ -#define SM_PI 3.14159265358979323846 /* pi */ -#define SM_PI_2 1.57079632679489661923 /* pi/2 */ -#define SM_PI_4 0.78539816339744830962 /* pi/4 */ -#define SM_1_PI 0.31830988618379067154 /* 1/pi */ -#define SM_2_PI 0.63661977236758134308 /* 2/pi */ -#define SM_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */ -#define SM_SQRT2 1.41421356237309504880 /* sqrt(2) */ -#define SM_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */ - -/* Typedefs common to both SPU and PPU */ -typedef struct divi4_s { - vector signed int quot; - vector signed int rem; -} divi4_t; - -typedef struct divu4_s { - vector unsigned int quot; - vector unsigned int rem; -} divu4_t; - - -/* Functions common to both SPU and PPU */ -vector signed int absi4(vector signed int x); -vector float acosf4(vector float x); -vector float acoshf4(vector float x); -vector float asinf4(vector float x); -vector float asinhf4(vector float x); -vector float atanf4(vector float x); -vector float atanhf4(vector float x); -vector float atan2f4(vector float y, vector float x); -vector float cbrtf4(vector float x); -vector float ceilf4(vector float x); -vector float copysignf4(vector float x, vector float y); -vector float cosf4(vector float x); -vector float coshf4(vector float x); -vector float divf4(vector float x, vector float y); -vector float divf4_fast(vector float x, vector float y); -divi4_t divi4(vector signed int dividend, vector signed int divisor); -divu4_t divu4(vector unsigned int dividend, vector unsigned int divisor); -vector float erff4(vector float x); -vector float erfcf4(vector float x); -vector float exp2f4(vector float x); -vector float expf4(vector float x); -vector float expm1f4(vector float x); -vector float fabsf4(vector float value); -vector float fdimf4(vector float x, vector float y); -vector float floorf4(vector float value); -vector float fmaf4(vector float x, vector float y, vector float z); -vector float fmaxf4(vector float x, vector float y); -vector float fminf4(vector float x, vector float y); -vector float fmodf4(vector float x, vector float y); -vector signed int fpclassifyf4(vector float x); -vector float frexpf4(vector float x, vector signed int *pexp); -vector float hypotf4(vector float x, vector float y); -vector signed int ilogbf4(vector float x); -vector signed int irintf4(vector float x); -vector signed int iroundf4(vector float x); -vector unsigned int is0denormf4(vector float x); -vector unsigned int isequalf4(vector float x, vector float y); -vector unsigned int isfinitef4(vector float x); -vector unsigned int isgreaterf4(vector float x, vector float y); -vector unsigned int isgreaterequalf4(vector float x, vector float y); -vector unsigned int isinff4(vector float x); -vector unsigned int islessf4(vector float x, vector float y); -vector unsigned int islessequalf4(vector float x, vector float y); -vector unsigned int islessgreaterf4(vector float x, vector float y); -vector unsigned int isnanf4(vector float x); -vector unsigned int isnormalf4(vector float x); -vector unsigned int isunorderedf4(vector float x, vector float y); -vector float ldexpf4(vector float x, vector signed int exp); -vector float lgammaf4(vector float x); -vector float log10f4(vector float x); -vector float log1pf4(vector float x); -vector float log2f4(vector float x); -vector float logbf4(vector float x); -vector float logf4(vector float x); -vector float modff4(vector float x, vector float *pint); -vector float nearbyintf4(vector float x); -vector float negatef4(vector float x); -vector signed int negatei4(vector signed int x); -vector float nextafterf4(vector float x, vector float y); -vector float powf4(vector float x, vector float y); -vector float recipf4(vector float a); -vector float remainderf4(vector float x, vector float y); -vector float remquof4(vector float x, vector float y, vector signed int *quo); -vector float rintf4(vector float x); -vector float roundf4(vector float x); -vector float rsqrtf4(vector float value); -vector float scalbnf4(vector float x, vector signed int exp); -vector unsigned int signbitf4(vector float x); -void sincosf4(vector float x, vector float *sx, vector float *cx); -vector float sinf4(vector float x); -vector float sinhf4(vector float x); -vector float sqrtf4(vector float in); -vector float tanf4(vector float angle); -vector float tanhf4(vector float x); -vector float tgammaf4(vector float x); -vector float truncf4(vector float x); - - -#ifdef __SPU__ -/* Typedefs specific to SPU */ -typedef struct llroundf4_s { - vector signed long long vll[2]; -} llroundf4_t; - -typedef struct lldivi2_s { - vector signed long long quot; - vector signed long long rem; -} lldivi2_t; - -typedef struct lldivu2_s { - vector unsigned long long quot; - vector unsigned long long rem; -} lldivu2_t; - - -/* Functions specific to SPU */ -llroundf4_t llrintf4(vector float in); -llroundf4_t llroundf4 (vector float x); -vector double acosd2(vector double x); -vector double acoshd2(vector double x); -vector double asind2(vector double x); -vector double asinhd2(vector double x); -vector double atan2d2(vector double y, vector double x); -vector double atand2(vector double x); -vector double atanhd2(vector double x); -vector double cbrtd2(vector double x); -vector double ceild2(vector double x); -vector float ceilf4_fast(vector float x); -vector double copysignd2(vector double x, vector double y); -vector double cosd2(vector double x); -vector double coshd2(vector double x); -vector double divd2(vector double a, vector double b); -vector double erfcd2(vector double x); -vector double erfd2(vector double x); -vector double exp2d2(vector double x); -vector double expd2(vector double x); -vector double expm1d2(vector double x); -vector double fabsd2(vector double x); -vector double fdimd2(vector double x, vector double y); -vector double floord2(vector double x); -vector float floorf4_fast(vector float value); -vector double fmad2(vector double x, vector double y, vector double z); -vector double fmaxd2(vector double x, vector double y); -vector double fmind2(vector double x, vector double y); -vector double fmodd2(vector double x, vector double y); -vector float fmodf4_fast(vector float x, vector float y); -vector signed long long fpclassifyd2(vector double x); -vector double frexpd2(vector double x, vector signed int *pexp); -vector double hypotd2(vector double x, vector double y); -vector signed int ilogbd2(vector double x); -vector unsigned long long is0denormd2(vector double x); -vector unsigned long long isequald2(vector double x, vector double y); -vector unsigned long long isfinited2(vector double x); -vector unsigned long long isgreaterd2(vector double x, vector double y); -vector unsigned long long isgreaterequald2(vector double x, vector double y); -vector unsigned long long isinfd2(vector double x); -vector unsigned long long islessd2(vector double x, vector double y); -vector unsigned long long islessequald2(vector double x, vector double y); -vector unsigned long long islessgreaterd2(vector double x, vector double y); -vector unsigned long long isnand2(vector double x); -vector unsigned long long isnormald2(vector double x); -vector unsigned long long isunorderedd2(vector double x, vector double y); -vector double ldexpd2(vector double x, vector signed int exp); -vector signed long long llabsi2(vector signed long long x); -lldivi2_t lldivi2(vector signed long long x, vector signed long long y); -lldivu2_t lldivu2(vector unsigned long long x, vector unsigned long long y); -vector double lgammad2(vector double x); -vector signed long long llrintd2(vector double in); -vector signed long long llroundd2(vector double x); -vector double log10d2(vector double x); -vector double log1pd2(vector double x); -vector double log2d2(vector double x); -vector double logd2(vector double x); -vector double modfd2(vector double x, vector double* pint); -vector double nearbyintd2(vector double x); -vector double negated2(vector double x); -vector double nextafterd2(vector double x, vector double y); -vector signed long long negatell2(vector signed long long x); -vector double powd2(vector double x, vector double y); -vector double recipd2(vector double value_d); -vector float recipf4_fast(vector float a); -vector double remainderd2(vector double x, vector double y); -vector double remquod2(vector double x, vector double y, vector signed int *quo); -vector double rintd2(vector double x); -vector double roundd2(vector double x); -vector double rsqrtd2(vector double x); -vector double scalbllnd2(vector double x, vector signed long long n); -vector unsigned long long signbitd2(vector double x); -void sincosd2(vector double x, vector double *sx, vector double *cx); -vector double sind2(vector double x); -vector double sinhd2(vector double x); -vector double sqrtd2(vector double x); -vector float sqrtf4_fast(vector float in); -vector double tand2(vector double x); -vector double tanhd2(vector double x); -vector double tgammad2(vector double x); -vector double truncd2(vector double x); - -#endif /* __SPU__ */ - -/* Functions specific to PPU */ -#ifdef __ALTIVEC__ -#endif - -#endif /* __SPU__ || __ALTIVEC__ */ - -#ifdef __cplusplus -} -#endif - -#endif /* __SIMD_MATH_H__ */ diff --git a/newlib/libm/machine/spu/headers/sin.h b/newlib/libm/machine/spu/headers/sin.h deleted file mode 100644 index 5d3fac823..000000000 --- a/newlib/libm/machine/spu/headers/sin.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/sind2.h" - -static __inline double _sin(double angle) -{ - return spu_extract(_sind2(spu_promote(angle, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/sincos.h b/newlib/libm/machine/spu/headers/sincos.h deleted file mode 100644 index 37c7d9416..000000000 --- a/newlib/libm/machine/spu/headers/sincos.h +++ /dev/null @@ -1,10 +0,0 @@ -#include "headers/sincosd2.h" - -static __inline void _sincos(double angle, double* sinx, double* cosx) -{ - vector double vsinx, vcosx; - - _sincosd2(spu_promote(angle, 0), &vsinx, &vcosx); - *sinx = spu_extract(vsinx, 0); - *cosx = spu_extract(vcosx, 0); -} diff --git a/newlib/libm/machine/spu/headers/sincosd2.h b/newlib/libm/machine/spu/headers/sincosd2.h deleted file mode 100644 index f87c36bc2..000000000 --- a/newlib/libm/machine/spu/headers/sincosd2.h +++ /dev/null @@ -1,105 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _SINCOSD2_H_ -#define _SINCOSD2_H_ 1 - -#include - -#include "cos_sin.h" - -/* - * FUNCTION - * void _sincosd2(vector double x, vector double *sx, vector double *cx) - * - * DESCRIPTION - * The _sincosd2 function computes the sine and cosine of a vector of - * angles (expressed in radians) to an accuracy of a double precision - * floating point. - * - * - */ - -static __inline void _sincosd2(vector double angle, - vector double *sinx, - vector double *cosx) -{ - vec_int4 octant; - vec_ullong2 select; - vec_double2 cos, sin; - vec_double2 toggle_sign; - - /* Range reduce the input angle x into the range -PI/4 to PI/4 - * by performing simple modulus. - */ - MOD_PI_OVER_FOUR(angle, octant); - - /* Compute the cosine and sine of the range reduced input. - */ - COMPUTE_COS_SIN(angle, cos, sin); - - /* - * See the comments for the sind2 and cosd2 functions for an - * explanation of the following steps. - */ - octant = spu_shuffle(octant, octant, ((vec_uchar16) { 0,1,2,3, 0,1,2,3, 8,9,10,11, 8,9,10,11 })); - select = (vec_ullong2)spu_cmpeq(spu_and(octant, 2), 0); - - toggle_sign = (vec_double2)spu_sl(spu_and(spu_add(octant, 2), 4), ((vec_uint4) { 29,32,29,32 })); - *cosx = spu_xor(spu_sel(sin, cos, select), toggle_sign); - - toggle_sign = (vec_double2)spu_sl(spu_and(octant, 4), ((vec_uint4) { 29,32,29,32 })); - *sinx = spu_xor(spu_sel(cos, sin, select), toggle_sign); - - return; -} - -#endif /* _SINCOSD2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/sincosf.h b/newlib/libm/machine/spu/headers/sincosf.h deleted file mode 100644 index e67e99701..000000000 --- a/newlib/libm/machine/spu/headers/sincosf.h +++ /dev/null @@ -1,10 +0,0 @@ -#include "headers/sincosf4.h" - -static __inline void _sincosf(float angle, float* sinx, float* cosx) -{ - vector float vsinx, vcosx; - - _sincosf4(spu_promote(angle, 0), &vsinx, &vcosx); - *sinx = spu_extract(vsinx, 0); - *cosx = spu_extract(vcosx, 0); -} diff --git a/newlib/libm/machine/spu/headers/sincosf4.h b/newlib/libm/machine/spu/headers/sincosf4.h deleted file mode 100644 index 8c95ed30b..000000000 --- a/newlib/libm/machine/spu/headers/sincosf4.h +++ /dev/null @@ -1,100 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _SINCOSF4_H_ -#define _SINCOSF4_H_ 1 - -#include - -#include "cos_sin.h" - -/* - * FUNCTION - * vector void _sincosf4(vector float angle, vector float *sx, vector float *cx) - * - * DESCRIPTION - * The _sincosf4 function computes the sine and cosine of a vector of - * angles (expressed in radians) to an accuracy of a single precision - * floating point. - * - */ - -static __inline void _sincosf4(vector float angle, - vector float *sinx, - vector float *cosx) -{ - - vec_int4 octant; - vec_uint4 select; - vec_float4 cos, sin; - vec_float4 toggle_sign; - - /* Range reduce the input angle x into the range -PI/4 to PI/4 - * by performing simple modulus. - */ - MOD_PI_OVER_FOUR_F(angle, octant); - - /* Compute the cosine and sine of the range reduced input. - */ - COMPUTE_COS_SIN_F(angle, cos, sin); - - select = spu_cmpeq(spu_and(octant, 2), 0); - - toggle_sign = (vec_float4)spu_sl(spu_and(octant, 4), 29); - *sinx = spu_xor(spu_sel(cos, sin, select), toggle_sign); - - toggle_sign = (vec_float4)spu_sl(spu_and(spu_add(octant, 2), 4), 29); - *cosx = spu_xor(spu_sel(sin, cos, select), toggle_sign); - - return; -} - -#endif /* _SINCOSF4_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/sind2.h b/newlib/libm/machine/spu/headers/sind2.h deleted file mode 100644 index 3133e9b7a..000000000 --- a/newlib/libm/machine/spu/headers/sind2.h +++ /dev/null @@ -1,110 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _SIND2_H_ -#define _SIND2_H_ 1 - -#include -#include "cos_sin.h" - -/* - * FUNCTION - * vector double _sind2(vector double angle) - * - * DESCRIPTION - * The _sind2 function computes the sine of a vector of angles (expressed - * in radians) to an accuracy of a double precision floating point. - * - */ -static __inline vector double _sind2(vector double angle) -{ - vec_int4 octant; - vec_ullong2 select; - vec_double2 cos, sin; - vec_double2 toggle_sign, answer; - - /* Range reduce the input angle x into the range -PI/4 to PI/4 - * by performing simple modulus. - */ - MOD_PI_OVER_FOUR(angle, octant); - - /* Compute the cosine and sine of the range reduced input. - */ - COMPUTE_COS_SIN(angle, cos, sin); - - /* For each SIMD element, select which result (cos or sin) to use - * with a sign correction depending upon the octant of the original - * angle (Maclaurin series). - * - * octants angles select sign toggle - * ------- ------------ ------ ----------- - * 0 0 to 45 sin no - * 1,2 45 to 135 cos no - * 3,4 135 to 225 sin yes - * 5,6 225 to 315 sin yes - * 7 315 to 360 cos no - */ - octant = spu_shuffle(octant, octant, ((vec_uchar16) { - 0,1, 2, 3, 0,1, 2, 3, - 8,9,10,11, 8,9,10,11 } )); - - toggle_sign = (vec_double2)spu_sl(spu_and(octant, 4), ((vec_uint4) { 29,32,29,32 })); - select = (vec_ullong2)spu_cmpeq(spu_and(octant, 2), 0); - - answer = spu_xor(spu_sel(cos, sin, select), toggle_sign); - - return (answer); -} - -#endif /* _SIND2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/sinf.h b/newlib/libm/machine/spu/headers/sinf.h deleted file mode 100644 index 389050ba2..000000000 --- a/newlib/libm/machine/spu/headers/sinf.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/sinf4.h" - -static __inline float _sinf(float angle) -{ - return spu_extract(_sinf4(spu_promote(angle, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/sinf4.h b/newlib/libm/machine/spu/headers/sinf4.h deleted file mode 100644 index b8a559ae0..000000000 --- a/newlib/libm/machine/spu/headers/sinf4.h +++ /dev/null @@ -1,107 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _SINF4_H_ -#define _SINF4_H_ 1 - -#include - -#include "cos_sin.h" - -/* - * FUNCTION - * vector float _sind2(vector float angle) - * - * DESCRIPTION - * The _sinf4 function computes the sine of a vector of angles (expressed - * in radians) to an accuracy of a single precision floating point. - * - */ -static __inline vector float _sinf4(vector float angle) -{ - vec_int4 octant; - vec_uint4 select; - vec_float4 cos, sin; - vec_float4 toggle_sign, answer; - - /* Range reduce the input angle x into the range -PI/4 to PI/4 - * by performing simple modulus. - */ - MOD_PI_OVER_FOUR_F(angle, octant); - - /* Compute the cosine and sine of the range reduced input. - */ - COMPUTE_COS_SIN_F(angle, cos, sin); - - /* For each SIMD element, select which result (cos or sin) to use - * with a sign correction depending upon the octant of the original - * angle (Maclaurin series). - * - * octants angles select sign toggle - * ------- ------------ ------ ----------- - * 0 0 to 45 sin no - * 1,2 45 to 135 cos no - * 3,4 135 to 225 sin yes - * 5,6 225 to 315 cos yes - * 7 315 to 360 sin no - */ - toggle_sign = (vec_float4)spu_sl(spu_and(octant, 4), 29); - select = spu_cmpeq(spu_and(octant, 2), 0); - - answer = spu_xor(spu_sel(cos, sin, select), toggle_sign); - - return (answer); -} - -#endif /* _SINF4_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/sinh.h b/newlib/libm/machine/spu/headers/sinh.h deleted file mode 100644 index f94afaf81..000000000 --- a/newlib/libm/machine/spu/headers/sinh.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/sinhd2.h" - -static __inline double _sinh(double x) -{ - return spu_extract(_sinhd2(spu_promote(x, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/sinhd2.h b/newlib/libm/machine/spu/headers/sinhd2.h deleted file mode 100644 index 59fafc52f..000000000 --- a/newlib/libm/machine/spu/headers/sinhd2.h +++ /dev/null @@ -1,133 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _SINHD2_H_ -#define _SINHD2_H_ 1 - -#include - -#include "expd2.h" -#include "recipd2.h" - -/* - * FUNCTION - * vector double _sinhd2(vector double angle) - * - * DESCRIPTION - * The _sinhd2 function computes the hyperbolic sine of a vector of - * angles (expressed in radians) to an accuracy of a double precision - * floating point. - */ -static __inline vector double _sinhd2(vector double x) -{ - // Coefficents for the power series - vec_double2 f03 = spu_splats(1.66666666666666666667E-01); // 1/(3!) - vec_double2 f05 = spu_splats(8.33333333333333333333E-03); // 1/(5!) - vec_double2 f07 = spu_splats(1.98412698412698412698E-04); // 1/(7!) - vec_double2 f09 = spu_splats(2.75573192239858906526E-06); // 1/(9!) - vec_double2 f11 = spu_splats(2.50521083854417187751E-08); // 1/(11!) - vec_double2 f13 = spu_splats(1.60590438368216145994E-10); // 1/(13!) - vec_double2 f15 = spu_splats(7.64716373181981647590E-13); // 1/(15!) - vec_double2 f17 = spu_splats(2.81145725434552076320E-15); // 1/(17!) - vec_double2 f19 = spu_splats(8.22063524662432971696E-18); // 1/(19!) - vec_double2 f21 = spu_splats(1.95729410633912612308E-20); // 1/(21!) - vec_double2 f23 = spu_splats(3.86817017063068403772E-23); // 1/(23!) - - - - // Check if the input is within the range [ -1.0 ... 1.0 ] - // If it is, we want to use the power series, otherwise - // we want to use the 0.5 * (e^x - e^-x) - - // round to float, check if within range. Results will be in - // slots 0 and 2, so we rotate right 4 bytes, and "or" with ourself - // to produce 64 bits of all 1's or 0's. - vec_uint4 use_exp = spu_cmpabsgt(spu_roundtf(x),spu_splats(1.0f)); - use_exp = spu_or(use_exp,spu_rlmaskqwbyte(use_exp,-4)); - - - - - // Perform the calculation of the power series using Horner's method - vec_double2 result; - vec_double2 x2 = spu_mul(x,x); - result = spu_madd(x2,f23,f21); - result = spu_madd(x2,result,f19); - result = spu_madd(x2,result,f17); - result = spu_madd(x2,result,f15); - result = spu_madd(x2,result,f13); - result = spu_madd(x2,result,f11); - result = spu_madd(x2,result,f09); - result = spu_madd(x2,result,f07); - result = spu_madd(x2,result,f05); - result = spu_madd(x2,result,f03); - result = spu_madd(x2,result,spu_splats(1.0)); - result = spu_mul(x,result); - - - // Perform calculation as a function of 0.5 * (e^x - e^-x) - vec_double2 ex = _expd2(x); - vec_double2 ex_inv = _recipd2(ex); - - vec_double2 r2= spu_sub(ex,ex_inv); - r2 = spu_mul(r2,spu_splats(0.5)); - - - // Select either the power series or exp version - result = spu_sel(result,r2,(vec_ullong2)use_exp); - - - - return result; - -} - -#endif /* _SINHD2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/sinhf.h b/newlib/libm/machine/spu/headers/sinhf.h deleted file mode 100644 index ddf99d4b6..000000000 --- a/newlib/libm/machine/spu/headers/sinhf.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/sinhf4.h" - -static __inline float _sinhf(float x) -{ - return spu_extract(_sinhf4(spu_promote(x, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/sinhf4.h b/newlib/libm/machine/spu/headers/sinhf4.h deleted file mode 100644 index de3da05ca..000000000 --- a/newlib/libm/machine/spu/headers/sinhf4.h +++ /dev/null @@ -1,116 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _SINHF4_H_ -#define _SINHF4_H_ 1 - -#include - -#include "expf4.h" -#include "recipf4.h" - - -/* - * FUNCTION - * vector float _sinhf4(vector float angle) - * - * DESCRIPTION - * The _sinhf4 function computes the hyperbolic sine of a vector of - * angles (expressed in radians) to an accuracy of a single precision - * floating point. - * - */ -static __inline vector float _sinhf4(vector float x) -{ - // 1.0000 (above this number, use sinh(x) = 0.5 * (e^x - e^-x) - vec_uint4 threshold = (vec_uint4)spu_splats(0x3F800000); - - vec_uint4 sign_mask = (vec_uint4)spu_splats(0x80000000); - - // Coefficents for the Taylor series - vec_float4 f03 = spu_splats(1.6666666666666667E-1f); // 1/3! - vec_float4 f05 = spu_splats(8.3333333333333333E-3f); // 1/5! - vec_float4 f07 = spu_splats(1.9841269841269841E-4f); // 1/7! - vec_float4 f09 = spu_splats(2.7557319223985891E-6f); // 1/9! - vec_float4 f11 = spu_splats(2.5052108385441719E-8f); // 1/11! - - - // Perform the calculation as a Taylor series - vec_float4 result; - vec_float4 x2 = spu_mul(x,x); - result = spu_madd(x2,f11,f09); - result = spu_madd(x2,result,f07); - result = spu_madd(x2,result,f05); - result = spu_madd(x2,result,f03); - result = spu_madd(x2,result,spu_splats(1.0f)); - result = spu_mul(x,result); - - - // Perform calculation as a function of 0.5 * (e^x - e^-x) - vec_float4 ex =_expf4(x); - vec_float4 ex_inv = _recipf4(ex); - - vec_float4 r2= spu_sub(ex,ex_inv); - r2 = spu_mul(r2,spu_splats(0.5f)); - - vec_uint4 xabs = spu_andc((vec_uint4)x,sign_mask); - vec_uint4 use_exp = spu_cmpgt(xabs,threshold); - - // Select either the Taylor or exp version - result = spu_sel(result,r2,use_exp); - - // Flip the sign if needed - result = (vec_float4)spu_or((vec_uint4)result,spu_and((vec_uint4)x,sign_mask)); - - return result; - -} -#endif /* _SINHF4_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/sqrt.h b/newlib/libm/machine/spu/headers/sqrt.h deleted file mode 100644 index 63b034dd9..000000000 --- a/newlib/libm/machine/spu/headers/sqrt.h +++ /dev/null @@ -1,134 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _SQRT_H_ -#define _SQRT_H_ 1 - -/* - * FUNCTION - * double _sqrt(double in) - * - * DESCRIPTION - * _sqrt computes the square root of the input "in" and returns the - * result. - */ -#include -#include "headers/vec_literal.h" -#include "headers/dom_chkd_less_than.h" - -static __inline double _sqrt(double in) -{ - vec_int4 bias_exp; - vec_uint4 exp; - vec_float4 fx, fg, fy, fd, fe, fy2, fhalf; - vec_ullong2 nochange; - vec_ullong2 mask = VEC_SPLAT_U64(0x7FE0000000000000ULL); - vec_double2 x, dx, de, dd, dy, dg, dy2, dhalf; - vec_double2 denorm, neg; - vec_double2 vc = { 0.0, 0.0 }; - - fhalf = VEC_SPLAT_F32(0.5f); - dhalf = VEC_SPLAT_F64(0.5); - - /* Coerce the input, in, into the argument reduced space [0.5, 2.0). - */ - x = spu_promote(in, 0); - dx = spu_sel(x, dhalf, mask); - - /* Compute an initial single precision guess for the square root (fg) - * and half reciprocal (fy2). - */ - fx = spu_roundtf(dx); - - fy2 = spu_rsqrte(fx); - fy = spu_mul(fy2, fhalf); - fg = spu_mul(fy2, fx); /* 12-bit approximation to sqrt(cx) */ - - /* Perform one single precision Newton-Raphson iteration to improve - * accuracy to about 22 bits. - */ - fe = spu_nmsub(fy, fg, fhalf); - fd = spu_nmsub(fg, fg, fx); - - fy = spu_madd(fy2, fe, fy); - fg = spu_madd(fy, fd, fg); /* 22-bit approximation */ - - dy = spu_extend(fy); - dg = spu_extend(fg); - - /* Perform two double precision Newton-Raphson iteration to improve - * accuracy to about 44 and 88 bits repectively. - */ - dy2 = spu_add(dy, dy); - de = spu_nmsub(dy, dg, dhalf); - dd = spu_nmsub(dg, dg, dx); - dy = spu_madd(dy2, de, dy); - dg = spu_madd(dy, dd, dg); /* 44 bit approximation */ - - dd = spu_nmsub(dg, dg, dx); - dg = spu_madd(dy, dd, dg); /* full double precision approximation */ - - - /* Compute the expected exponent assuming that it is not a special value. - * See special value handling below. - */ - bias_exp = spu_rlmaska(spu_sub((vec_int4)spu_and((vec_ullong2)x, mask), - (vec_int4)VEC_SPLAT_U64(0x3FE0000000000000ULL)), -1); - dg = (vec_double2)spu_add((vec_int4)dg, bias_exp); - - - /* Handle special inputs. These include: - * - * input output - * ========= ========= - * -0 -0 - * +infinity +infinity - * NaN NaN - * <0 NaN - * denorm zero - */ - exp = (vec_uint4)spu_and((vec_ullong2)x, VEC_SPLAT_U64(0xFFF0000000000000ULL)); - exp = spu_shuffle(exp, exp, VEC_LITERAL(vec_uchar16, 0,1,2,3,0,1,2,3, 8,9,10,11,8,9,10,11)); - - neg = (vec_double2)spu_rlmaska((vec_int4)exp, -31); - denorm = (vec_double2)spu_rlmask(spu_cmpeq(spu_sl(exp, 1), 0), VEC_LITERAL(vec_int4, -1,0,-1,0)); - - nochange = (vec_ullong2)spu_cmpeq(exp, 0x7FF00000); - - dg = spu_sel(spu_andc(spu_or(dg, neg), denorm), x, nochange); - -#ifndef _IEEE_LIBM - dom_chkd_less_than(spu_splats(in), vc); -#endif - return (spu_extract(dg, 0)); -} -#endif /* _SQRT_H_ */ diff --git a/newlib/libm/machine/spu/headers/sqrtd2.h b/newlib/libm/machine/spu/headers/sqrtd2.h deleted file mode 100644 index 88468d1cc..000000000 --- a/newlib/libm/machine/spu/headers/sqrtd2.h +++ /dev/null @@ -1,162 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _SQRTD2_H_ -#define _SQRTD2_H_ 1 - -#include - -/* - * FUNCTION - * vector double _sqrtd2(vector double in) - * - * DESCRIPTION - * The _sqrtd2 function computes the square root of the vector input "in" - * and returns the result. - * - */ -static __inline vector double _sqrtd2(vector double in) -{ - vec_int4 bias_exp; - vec_uint4 exp; - vec_float4 fx, fg, fy, fd, fe, fy2, fhalf; - vec_ullong2 nochange, denorm; - vec_ullong2 mask = spu_splats(0x7FE0000000000000ULL); - vec_double2 dx, de, dd, dy, dg, dy2, dhalf; - vec_double2 neg; - vec_double2 one = spu_splats(1.0); - vec_double2 two_pow_52 = (vec_double2)spu_splats(0x4330000000000000ULL); - - /* If the input is a denorm, then multiply it by 2^52 so that the input is no - * longer denormal. - */ - exp = (vec_uint4)spu_and((vec_ullong2)in, spu_splats(0xFFF0000000000000ULL)); - denorm = (vec_ullong2)spu_cmpeq(exp,0); - - in = spu_mul(in, spu_sel(one, two_pow_52, denorm)); - - fhalf = spu_splats(0.5f); - dhalf = spu_splats(0.5); - - /* Coerce the input, in, into the argument reduced space [0.5, 2.0). - */ - dx = spu_sel(in, dhalf, mask); - - /* Compute an initial single precision guess for the square root (fg) - * and half reciprocal (fy2). - */ - fx = spu_roundtf(dx); - - fy2 = spu_rsqrte(fx); - fy = spu_mul(fy2, fhalf); - fg = spu_mul(fy2, fx); /* 12-bit approximation to sqrt(cx) */ - - /* Perform one single precision Newton-Raphson iteration to improve - * accuracy to about 22 bits. - */ - fe = spu_nmsub(fy, fg, fhalf); - fd = spu_nmsub(fg, fg, fx); - - fy = spu_madd(fy2, fe, fy); - fg = spu_madd(fy, fd, fg); /* 22-bit approximation */ - - dy = spu_extend(fy); - dg = spu_extend(fg); - - /* Perform two double precision Newton-Raphson iteration to improve - * accuracy to about 44 and 88 bits repectively. - */ - dy2 = spu_add(dy, dy); - de = spu_nmsub(dy, dg, dhalf); - dd = spu_nmsub(dg, dg, dx); - dy = spu_madd(dy2, de, dy); - dg = spu_madd(dy, dd, dg); /* 44 bit approximation */ - - dd = spu_nmsub(dg, dg, dx); - dg = spu_madd(dy, dd, dg); /* full double precision approximation */ - - - /* Compute the expected exponent assuming that it is not a special value. - * See special value handling below. - */ - bias_exp = spu_rlmaska(spu_sub((vec_int4)spu_and((vec_ullong2)in, mask), - (vec_int4)spu_splats(0x3FE0000000000000ULL)), - -1); - - /* Adjust the exponent bias if the input was denormalized */ - bias_exp = spu_sub(bias_exp, (vec_int4)spu_and(spu_splats(0x01A0000000000000ULL), denorm)); - - dg = (vec_double2)spu_add((vec_int4)dg, bias_exp); - - /* Handle special inputs. These include: - * - * input output - * ========= ========= - * -0 -0 - * 0 0 - * +infinity +infinity - * NaN NaN - * <0 NaN - */ - exp = spu_shuffle(exp, exp, ((vec_uchar16) { 0,1,2,3,0,1,2,3, 8,9,10,11,8,9,10,11 })); - - neg = (vec_double2)spu_rlmaska((vec_int4)exp, -31); - nochange = spu_or((vec_ullong2)spu_cmpeq(exp, 0x7FF00000), - spu_cmpeq(in, spu_splats(0.0))); - - dg = spu_sel(spu_or(dg, neg), in, nochange); - - return (dg); -} -#endif /* _SQRTD2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/sqrtf.h b/newlib/libm/machine/spu/headers/sqrtf.h deleted file mode 100644 index c1f5ab223..000000000 --- a/newlib/libm/machine/spu/headers/sqrtf.h +++ /dev/null @@ -1,16 +0,0 @@ -#include "headers/sqrtf4.h" -#include "headers/dom_chkf_less_than.h" - -static __inline float _sqrtf(float in) -{ - float res; - vector float vx; - vector float vc = { 0.0, 0.0, 0.0, 0.0 }; - - vx = spu_promote(in, 0); - res = spu_extract(_sqrtf4(vx), 0); -#ifndef _IEEE_LIBM - dom_chkf_less_than(vx, vc); -#endif - return res; -} diff --git a/newlib/libm/machine/spu/headers/sqrtf4.h b/newlib/libm/machine/spu/headers/sqrtf4.h deleted file mode 100644 index ef5ff3b69..000000000 --- a/newlib/libm/machine/spu/headers/sqrtf4.h +++ /dev/null @@ -1,128 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _SQRTF4_H_ -#define _SQRTF4_H_ 1 - -#include - -/* - * FUNCTION - * vector float _sqrtf4(vector float in) - * - * DESCRIPTION - * The _sqrtf4 function computes the square root of the vector input "in" - *and returns the result. - * - */ -static __inline vector float _sqrtf4(vector float in) -{ - vec_uint4 exp, valid; - vec_uint4 mask = spu_splats((unsigned int)0xFF000000); - vec_uint4 half = spu_splats((unsigned int)0x00800000); - vec_float4 one = spu_splats(1.0f); - vec_float4 three = spu_splats(3.0f); - vec_float4 x, y0, y1, y1_n1, y1_p1, y1_p2, y1_p3; - vec_float4 mant, err, err_p1, err_p2, err_p3; - vec_float4 out; - - /* Compute the mantissa of the result seperately from - * the exponent to assure complete accuracy over the allowable - * input range. The mantissa is computed for inputs in the - * range [0.5, 2.0). - */ - x = spu_sel(in, one, mask); - y0 = spu_rsqrte(x); - - /* Perform one iteration of the Newton-Raphsom method in single precision - * arithmetic. - */ - y1 = spu_mul(spu_nmsub(x, spu_mul(y0, y0), three), - spu_mul(y0, (vec_float4)(spu_sub((vec_uint4)(x), half)))); - - /* Correct the result for possible error. The range of error is -3 to +1. - * Identify the extent of the error and correct for it. - */ - y1_p3 = (vec_float4)spu_add((vec_uint4)(y1), 3); - y1_p2 = (vec_float4)spu_add((vec_uint4)(y1), 2); - y1_p1 = (vec_float4)spu_add((vec_uint4)(y1), 1); - y1_n1 = (vec_float4)spu_add((vec_uint4)(y1), -1); - - err = spu_nmsub(y1, y1, x); - err_p1 = spu_nmsub(y1_p1, y1_p1, x); - err_p2 = spu_nmsub(y1_p2, y1_p2, x); - err_p3 = spu_nmsub(y1_p3, y1_p3, x); - - mant = spu_sel(y1_n1, y1, spu_cmpgt((vec_int4)(err), -1)); - mant = spu_sel(mant, y1_p1, spu_cmpgt((vec_int4)(err_p1), -1)); - mant = spu_sel(mant, y1_p2, spu_cmpgt((vec_int4)(err_p2), -1)); - mant = spu_sel(mant, y1_p3, spu_cmpgt((vec_int4)(err_p3), -1)); - - /* Compute the expected exponent. If the exponent is zero or the input is - * negative, then set the result to zero. - */ - exp = spu_rlmask(spu_add((vec_uint4)(in), (vec_uint4)(one)), -1); - - valid = spu_cmpgt(spu_and((vec_int4)(in), (vec_int4)(mask)), 0); - - /* Merge the computed exponent and mantissa. - */ - out = spu_and(spu_sel(mant, (vec_float4)(exp), spu_splats(0xFF800000)), (vec_float4)(valid)); - - - return (out); - -} - -#endif /* _SQRTF4_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/tan.h b/newlib/libm/machine/spu/headers/tan.h deleted file mode 100644 index 04072fb86..000000000 --- a/newlib/libm/machine/spu/headers/tan.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/tand2.h" - -static __inline double _tan(double angle) -{ - return spu_extract(_tand2(spu_promote(angle, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/tand2.h b/newlib/libm/machine/spu/headers/tand2.h deleted file mode 100644 index 70b35a3ee..000000000 --- a/newlib/libm/machine/spu/headers/tand2.h +++ /dev/null @@ -1,117 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _TAND2_H_ -#define _TAND2_H_ 1 - -#include - -#include "cos_sin.h" -#include "divd2.h" - -/* - * FUNCTION - * vector double _tand2(vector double angle) - * - * DESCRIPTION - * The _tand2 function computes the tangent of a vector of "angle"s - * (expressed in radians) to an accuracy of double precision floating - * point. - * - */ -static __inline vector double _tand2(vector double angle) -{ - vec_int4 octant; - vec_ullong2 select; - vec_double2 cos, sin; - vec_double2 num, den; - vec_double2 toggle_sign, answer; - - /* Range reduce the input angle x into the range -PI/4 to PI/4 - * by performing simple modulus. - */ - MOD_PI_OVER_FOUR(angle, octant); - - /* Compute the cosine and sine of the range reduced input. - */ - COMPUTE_COS_SIN(angle, cos, sin); - - /* For each SIMD element, select the numerator, denominator, and sign - * correction depending upon the octant of the original angle. - * - * octants angles numerator denominator sign toggle - * ------- ------------ --------- ----------- ----------- - * 0 0 to 45 sin cos no - * 1,2 45 to 135 cos sin no,yes - * 3,4 135 to 225 sin cos yes,no - * 5,6 225 to 315 cos sin no,yes - * 7 315 to 360 sin cos yes - */ - octant = spu_shuffle(octant, octant, ((vec_uchar16) { - 0,1, 2, 3, 0,1, 2, 3, - 8,9,10,11, 8,9,10,11 })); - - toggle_sign = spu_and((vec_double2)spu_sl(octant, 30), - (vec_double2) spu_splats(0x8000000000000000ULL)); - - select = (vec_ullong2)spu_cmpeq(spu_and(octant, 2), 0); - num = spu_sel(cos, sin, select); - den = spu_sel(sin, cos, select); - - answer = spu_xor(_divd2(num, den), toggle_sign); - - return (answer); -} - -#endif /* _TAND2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/tanf.h b/newlib/libm/machine/spu/headers/tanf.h deleted file mode 100644 index 6e10186c3..000000000 --- a/newlib/libm/machine/spu/headers/tanf.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/tanf4.h" - -static __inline float _tanf(float angle) -{ - return spu_extract(_tanf4(spu_promote(angle, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/tanf4.h b/newlib/libm/machine/spu/headers/tanf4.h deleted file mode 100644 index 8496b8b28..000000000 --- a/newlib/libm/machine/spu/headers/tanf4.h +++ /dev/null @@ -1,112 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _TANF4_H_ -#define _TANF4_H_ 1 - -#include - -#include "cos_sin.h" -#include "divf4.h" - -/* - * FUNCTION - * vector float _tanf4(vector float angle) - * - * DESCRIPTION - * The _tanf4 function computes the tangent of a vector of "angle"s - * (expressed in radians) to an accuracy of single precision floating - * point. - * - */ -static __inline vector float _tanf4(vector float angle) -{ - vec_int4 octant; - vec_uint4 select; - vec_float4 cos, sin; - vec_float4 num, den; - vec_float4 toggle_sign, answer; - - /* Range reduce the input angle x into the range -PI/4 to PI/4 - * by performing simple modulus. - */ - MOD_PI_OVER_FOUR_F(angle, octant); - - /* Compute the cosine and sine of the range reduced input. - */ - COMPUTE_COS_SIN_F(angle, cos, sin); - - /* For each SIMD element, select the numerator, denominator, and sign - * correction depending upon the octant of the original angle. - * - * octants angles numerator denominator sign toggle - * ------- ------------ --------- ----------- ----------- - * 0 0 to 45 sin cos no - * 1,2 45 to 135 cos sin no,yes - * 3,4 135 to 225 sin cos yes,no - * 5,6 225 to 315 cos sin no,yes - * 7 315 to 360 sin cos yes - */ - toggle_sign = (vec_float4)spu_sl(spu_and(octant, 2), 30); - - select = spu_cmpeq(spu_and(octant, 2), 0); - num = spu_sel(cos, sin, select); - den = spu_sel(sin, cos, select); - - answer = spu_xor(_divf4(num, den), toggle_sign); - - return (answer); -} - -#endif /* _TANF4_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/tanh.h b/newlib/libm/machine/spu/headers/tanh.h deleted file mode 100644 index 03d29dc8d..000000000 --- a/newlib/libm/machine/spu/headers/tanh.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/tanhd2.h" - -static __inline double _tanh(double x) -{ - return spu_extract(_tanhd2(spu_promote(x, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/tanhd2.h b/newlib/libm/machine/spu/headers/tanhd2.h deleted file mode 100644 index 20684c818..000000000 --- a/newlib/libm/machine/spu/headers/tanhd2.h +++ /dev/null @@ -1,173 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _TANHD2_H_ -#define _TANHD2_H_ 1 - -#include - -#include "expd2.h" -#include "divd2.h" - - -/* - * Taylor coefficients for tanh - */ -#define TANH_TAY01 1.000000000000000000000000000000E0 -#define TANH_TAY02 -3.333333333333333333333333333333E-1 -#define TANH_TAY03 1.333333333333333333333333333333E-1 -#define TANH_TAY04 -5.396825396825396825396825396825E-2 -#define TANH_TAY05 2.186948853615520282186948853616E-2 -#define TANH_TAY06 -8.863235529902196568863235529902E-3 -#define TANH_TAY07 3.592128036572481016925461369906E-3 -#define TANH_TAY08 -1.455834387051318268249485180702E-3 -#define TANH_TAY09 5.900274409455859813780759937000E-4 -#define TANH_TAY10 -2.391291142435524814857314588851E-4 -#define TANH_TAY11 9.691537956929450325595875000389E-5 -#define TANH_TAY12 -3.927832388331683405337080809312E-5 -#define TANH_TAY13 1.591890506932896474074427981657E-5 -#define TANH_TAY14 -6.451689215655430763190842315303E-6 -#define TANH_TAY15 2.614771151290754554263594256410E-6 -#define TANH_TAY16 -1.059726832010465435091355394125E-6 -#define TANH_TAY17 4.294911078273805854820351280397E-7 - - -/* - * FUNCTION - * vector double _tanhd2(vector double x) - * - * DESCRIPTION - * The _tanhd2 function computes the hyperbolic tangent for each - * element of the input vector. - * - * We use the following to approximate tanh: - * - * |x| <= .25: Taylor Series - * |x| > .25: tanh(x) = (exp(2x) - 1)/(exp(2x) + 1) - * - * - * SPECIAL CASES: - * - tanh(+/- 0) = +/-0 - * - tanh(+/- infinity) = +/- 1 - * - tanh(NaN) = NaN - * - */ - -static __inline vector double _tanhd2(vector double x) -{ - vector double signbit = spu_splats(-0.0); - vector double oned = spu_splats(1.0); - vector double twod = spu_splats(2.0); - vector double infd = (vector double)spu_splats(0x7FF0000000000000ull); - vector double xabs; - vector double x2; - vector unsigned long long gttaylor; - vector double e; - vector double tresult; - vector double eresult; - vector double result; - - xabs = spu_andc(x, signbit); - - /* - * This is where we switch from Taylor Series - * to exponential formula. - */ - gttaylor = spu_cmpgt(xabs, spu_splats(0.25)); - - - /* - * Taylor Series Approximation - */ - x2 = spu_mul(x,x); - tresult = spu_madd(x2, spu_splats(TANH_TAY11), spu_splats(TANH_TAY10)); - tresult = spu_madd(x2, tresult, spu_splats(TANH_TAY09)); - tresult = spu_madd(x2, tresult, spu_splats(TANH_TAY08)); - tresult = spu_madd(x2, tresult, spu_splats(TANH_TAY07)); - tresult = spu_madd(x2, tresult, spu_splats(TANH_TAY06)); - tresult = spu_madd(x2, tresult, spu_splats(TANH_TAY05)); - tresult = spu_madd(x2, tresult, spu_splats(TANH_TAY04)); - tresult = spu_madd(x2, tresult, spu_splats(TANH_TAY03)); - tresult = spu_madd(x2, tresult, spu_splats(TANH_TAY02)); - tresult = spu_madd(x2, tresult, spu_splats(TANH_TAY01)); - tresult = spu_mul(xabs, tresult); - - - /* - * Exponential Formula - * Our expd2 function gives a more accurate result in general - * with xabs instead of x for x<0. We correct for sign later. - */ - e = _expd2(spu_mul(xabs, twod)); - eresult = _divd2(spu_sub(e, oned), spu_add(e, oned)); - - - /* - * Select Taylor or exp result. - */ - result = spu_sel(tresult, eresult, gttaylor); - - /* - * Inf and NaN special cases. NaN is already in result - * for x = NaN. - */ - result = spu_sel(result, oned, spu_cmpeq(xabs, infd)); - - /* - * Antisymmetric function - preserve sign bit of x - * in the result. - */ - result = spu_sel(result, x, (vec_ullong2)signbit); - - return result; -} - -#endif /* _TANHD2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/tanhf.h b/newlib/libm/machine/spu/headers/tanhf.h deleted file mode 100644 index 545b073fe..000000000 --- a/newlib/libm/machine/spu/headers/tanhf.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "headers/tanhf4.h" - -static __inline float _tanhf(float x) -{ - return spu_extract(_tanhf4(spu_promote(x, 0)), 0); -} diff --git a/newlib/libm/machine/spu/headers/tanhf4.h b/newlib/libm/machine/spu/headers/tanhf4.h deleted file mode 100644 index 696ccc160..000000000 --- a/newlib/libm/machine/spu/headers/tanhf4.h +++ /dev/null @@ -1,147 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _TANHF4_H_ -#define _TANHF4_H_ 1 - -#include - -#include "expf4.h" -#include "divf4.h" - -#include "tanhd2.h" - -/* - * FUNCTION - * vector float _tanhf4(vector float x) - * - * DESCRIPTION - * The _tanhf4 function computes the hyperbolic tangent for each - * element of the input vector. - * - * We use the following to approximate tanh: - * - * |x| <= .25: Taylor Series - * |x| > .25: tanh(x) = (exp(2x) - 1)/(exp(2x) + 1) - * - * - * SPECIAL CASES: - * - tanh(+/- 0) = +/-0 - * - tanh(+/- infinity) = +/- 1 - * - */ - -static __inline vector float _tanhf4(vector float x) -{ - vector float signbit = spu_splats(-0.0f); - vector float onef = spu_splats(1.0f); - vector float twof = spu_splats(2.0f); - vector float xabs; - vector float x2; - vector unsigned int gttaylor; - vector float e; - vector float tresult; - vector float eresult; - vector float result; - - xabs = spu_andc(x, signbit); - - /* - * This is where we switch from Taylor Series - * to exponential formula. - */ - gttaylor = spu_cmpgt(xabs, spu_splats(0.25f)); - - - /* - * Taylor Series Approximation - */ - x2 = spu_mul(x,x); - tresult = spu_madd(x2, spu_splats((float)TANH_TAY06), spu_splats((float)TANH_TAY05)); - tresult = spu_madd(x2, tresult, spu_splats((float)TANH_TAY04)); - tresult = spu_madd(x2, tresult, spu_splats((float)TANH_TAY03)); - tresult = spu_madd(x2, tresult, spu_splats((float)TANH_TAY02)); - tresult = spu_madd(x2, tresult, spu_splats((float)TANH_TAY01)); - tresult = spu_mul(xabs, tresult); - - - /* - * Exponential Formula - * Our expf4 function gives a more accurate result in general - * with xabs instead of x for x<0. We correct for sign later. - */ - e = _expf4(spu_mul(xabs, twof)); - eresult = _divf4(spu_sub(e, onef), spu_add(e, onef)); - - - /* - * Select Taylor or exp result. - */ - result = spu_sel(tresult, eresult, gttaylor); - - /* - * Correct for accumulated truncation error when - * tanh(x) should return 1. - * Note that this also handles the special case of - * x = +/- infinity. - */ - result = spu_sel(result, onef, spu_cmpgt(xabs, spu_splats(9.125f))); - - /* - * Antisymmetric function - preserve sign bit of x - * in the result. - */ - result = spu_sel(result, x, (vec_uint4)signbit); - - return result; -} - -#endif /* _TANHF4_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/tgamma.h b/newlib/libm/machine/spu/headers/tgamma.h deleted file mode 100644 index bd2f31f27..000000000 --- a/newlib/libm/machine/spu/headers/tgamma.h +++ /dev/null @@ -1,30 +0,0 @@ -#include -#include "headers/truncd2.h" -#include "headers/tgammad2.h" - -static __inline double _tgamma(double x) -{ - double res; - vector double vx; - vector double truncx; - vector double vc = { 0.0, 0.0 }; - vector unsigned long long cmpres; - vector signed int verrno, ferrno; - vector signed int fail = { EDOM, EDOM, EDOM, EDOM }; - - vx = spu_promote(x, 0); - res = spu_extract(_tgammad2(vx), 0); - -#ifndef _IEEE_LIBM - /* - * use vector truncd2 rather than splat x, and splat truncx. - */ - truncx = _truncd2(vx); - cmpres = spu_cmpeq(truncx, vx); - verrno = spu_splats(errno); - ferrno = spu_sel(verrno, fail, (vector unsigned int) cmpres); - cmpres = spu_cmpgt(vc, vx); - errno = spu_extract(spu_sel(verrno, ferrno, (vector unsigned int) cmpres), 0); -#endif - return res; -} diff --git a/newlib/libm/machine/spu/headers/tgammad2.h b/newlib/libm/machine/spu/headers/tgammad2.h deleted file mode 100644 index 5dbb287b7..000000000 --- a/newlib/libm/machine/spu/headers/tgammad2.h +++ /dev/null @@ -1,301 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ - -#ifndef _TGAMMAD2_H_ -#define _TGAMMAD2_H_ 1 - -#include -#include "simdmath.h" - -#include "recipd2.h" -#include "truncd2.h" -#include "expd2.h" -#include "logd2.h" -#include "divd2.h" -#include "sind2.h" -#include "powd2.h" - - -/* - * FUNCTION - * vector double _tgammad2(vector double x) - * - * DESCRIPTION - * _tgammad2 - * - * This is an interesting function to approximate fast - * and accurately. We take a fairly standard approach - break - * the domain into 5 separate regions: - * - * 1. [-infinity, 0) - use - * 2. [0, 1) - push x into [1,2), then adjust the - * result. - * 3. [1, 2) - use a rational approximation. - * 4. [2, 10) - pull back into [1, 2), then adjust - * the result. - * 5. [10, +infinity] - use Stirling's Approximation. - * - * - * Special Cases: - * - tgamma(+/- 0) returns +/- infinity - * - tgamma(negative integer) returns NaN - * - tgamma(-infinity) returns NaN - * - tgamma(infinity) returns infinity - * - */ - - -/* - * Coefficients for Stirling's Series for Gamma() - */ -/* 1/ 1 */ -#define STIRLING_00 1.000000000000000000000000000000000000E0 -/* 1/ 12 */ -#define STIRLING_01 8.333333333333333333333333333333333333E-2 -/* 1/ 288 */ -#define STIRLING_02 3.472222222222222222222222222222222222E-3 -/* -139/ 51840 */ -#define STIRLING_03 -2.681327160493827160493827160493827160E-3 -/* -571/ 2488320 */ -#define STIRLING_04 -2.294720936213991769547325102880658436E-4 -/* 163879/ 209018880 */ -#define STIRLING_05 7.840392217200666274740348814422888497E-4 -/* 5246819/ 75246796800 */ -#define STIRLING_06 6.972813758365857774293988285757833083E-5 -/* -534703531/ 902961561600 */ -#define STIRLING_07 -5.921664373536938828648362256044011874E-4 -/* -4483131259/ 86684309913600 */ -#define STIRLING_08 -5.171790908260592193370578430020588228E-5 -/* 432261921612371/ 514904800886784000 */ -#define STIRLING_09 8.394987206720872799933575167649834452E-4 -/* 6232523202521089/ 86504006548979712000 */ -#define STIRLING_10 7.204895416020010559085719302250150521E-5 -/* -25834629665134204969/ 13494625021640835072000 */ -#define STIRLING_11 -1.914438498565477526500898858328522545E-3 -/* -1579029138854919086429/ 9716130015581401251840000 */ -#define STIRLING_12 -1.625162627839158168986351239802709981E-4 -/* 746590869962651602203151/ 116593560186976815022080000 */ -#define STIRLING_13 6.403362833808069794823638090265795830E-3 -/* 1511513601028097903631961/ 2798245444487443560529920000 */ -#define STIRLING_14 5.401647678926045151804675085702417355E-4 -/* -8849272268392873147705987190261/ 299692087104605205332754432000000 */ -#define STIRLING_15 -2.952788094569912050544065105469382445E-2 -/* -142801712490607530608130701097701/ 57540880724084199423888850944000000 */ -#define STIRLING_16 -2.481743600264997730915658368743464324E-3 - - -/* - * Rational Approximation Coefficients for the - * domain [1, 2). - */ -#define TGD2_P00 -1.8211798563156931777484715e+05 -#define TGD2_P01 -8.7136501560410004458390176e+04 -#define TGD2_P02 -3.9304030489789496641606092e+04 -#define TGD2_P03 -1.2078833505605729442322627e+04 -#define TGD2_P04 -2.2149136023607729839568492e+03 -#define TGD2_P05 -7.2672456596961114883015398e+02 -#define TGD2_P06 -2.2126466212611862971471055e+01 -#define TGD2_P07 -2.0162424149396112937893122e+01 - -#define TGD2_Q00 1.0000000000000000000000000 -#define TGD2_Q01 -1.8212849094205905566923320e+05 -#define TGD2_Q02 -1.9220660507239613798446953e+05 -#define TGD2_Q03 2.9692670736656051303725690e+04 -#define TGD2_Q04 3.0352658363629092491464689e+04 -#define TGD2_Q05 -1.0555895821041505769244395e+04 -#define TGD2_Q06 1.2786642579487202056043316e+03 -#define TGD2_Q07 -5.5279768804094054246434098e+01 - -static __inline vector double _tgammad2(vector double x) -{ - vector double signbit = spu_splats(-0.0); - vector double zerod = spu_splats(0.0); - vector double halfd = spu_splats(0.5); - vector double oned = spu_splats(1.0); - vector double ninep9d = (vec_double2)spu_splats(0x4023FFFFFFFFFFFFull); - vector double twohd = spu_splats(200.0); - vector double pi = spu_splats(SM_PI); - vector double sqrt2pi = spu_splats(2.50662827463100050241576528481); - vector double inf = (vector double)spu_splats(0x7FF0000000000000ull); - vector double nan = (vector double)spu_splats(0x7FF8000000000000ull); - - - vector double xabs; - vector double xscaled; - vector double xtrunc; - vector double xinv; - vector double nresult; - vector double rresult; /* Rational Approx result */ - vector double sresult; /* Stirling's result */ - vector double result; - vector double pr,qr; - - vector unsigned long long gt0 = spu_cmpgt(x, zerod); - vector unsigned long long gt1 = spu_cmpgt(x, oned); - vector unsigned long long gt9p9 = spu_cmpgt(x, ninep9d); - vector unsigned long long gt200 = spu_cmpgt(x, twohd); - - - xabs = spu_andc(x, signbit); - - /* - * For x in [0, 1], add 1 to x, use rational - * approximation, then use: - * - * gamma(x) = gamma(x+1)/x - * - */ - xabs = spu_sel(spu_add(xabs, oned), xabs, gt1); - xtrunc = _truncd2(xabs); - - - /* - * For x in [2, 10): - */ - xscaled = spu_add(oned, spu_sub(xabs, xtrunc)); - - /* - * For x in [1,2), use a rational approximation. - */ - pr = spu_madd(xscaled, spu_splats(TGD2_P07), spu_splats(TGD2_P06)); - pr = spu_madd(pr, xscaled, spu_splats(TGD2_P05)); - pr = spu_madd(pr, xscaled, spu_splats(TGD2_P04)); - pr = spu_madd(pr, xscaled, spu_splats(TGD2_P03)); - pr = spu_madd(pr, xscaled, spu_splats(TGD2_P02)); - pr = spu_madd(pr, xscaled, spu_splats(TGD2_P01)); - pr = spu_madd(pr, xscaled, spu_splats(TGD2_P00)); - - qr = spu_madd(xscaled, spu_splats(TGD2_Q07), spu_splats(TGD2_Q06)); - qr = spu_madd(qr, xscaled, spu_splats(TGD2_Q05)); - qr = spu_madd(qr, xscaled, spu_splats(TGD2_Q04)); - qr = spu_madd(qr, xscaled, spu_splats(TGD2_Q03)); - qr = spu_madd(qr, xscaled, spu_splats(TGD2_Q02)); - qr = spu_madd(qr, xscaled, spu_splats(TGD2_Q01)); - qr = spu_madd(qr, xscaled, spu_splats(TGD2_Q00)); - - rresult = _divd2(pr, qr); - rresult = spu_sel(_divd2(rresult, x), rresult, gt1); - - /* - * If x was in [2,10) and we pulled it into [1,2), we need to push - * it back out again. - */ - rresult = spu_sel(rresult, spu_mul(rresult, xscaled), spu_cmpgt(x, xscaled)); /* [2,3) */ - xscaled = spu_add(xscaled, oned); - rresult = spu_sel(rresult, spu_mul(rresult, xscaled), spu_cmpgt(x, xscaled)); /* [3,4) */ - xscaled = spu_add(xscaled, oned); - rresult = spu_sel(rresult, spu_mul(rresult, xscaled), spu_cmpgt(x, xscaled)); /* [4,5) */ - xscaled = spu_add(xscaled, oned); - rresult = spu_sel(rresult, spu_mul(rresult, xscaled), spu_cmpgt(x, xscaled)); /* [5,6) */ - xscaled = spu_add(xscaled, oned); - rresult = spu_sel(rresult, spu_mul(rresult, xscaled), spu_cmpgt(x, xscaled)); /* [6,7) */ - xscaled = spu_add(xscaled, oned); - rresult = spu_sel(rresult, spu_mul(rresult, xscaled), spu_cmpgt(x, xscaled)); /* [7,8) */ - xscaled = spu_add(xscaled, oned); - rresult = spu_sel(rresult, spu_mul(rresult, xscaled), spu_cmpgt(x, xscaled)); /* [8,9) */ - xscaled = spu_add(xscaled, oned); - rresult = spu_sel(rresult, spu_mul(rresult, xscaled), spu_cmpgt(x, xscaled)); /* [9,10) */ - - - /* - * For x >= 10, we use Stirling's Approximation - */ - vector double sum; - xinv = _recipd2(xabs); - sum = spu_madd(xinv, spu_splats(STIRLING_16), spu_splats(STIRLING_15)); - sum = spu_madd(sum, xinv, spu_splats(STIRLING_14)); - sum = spu_madd(sum, xinv, spu_splats(STIRLING_13)); - sum = spu_madd(sum, xinv, spu_splats(STIRLING_12)); - sum = spu_madd(sum, xinv, spu_splats(STIRLING_11)); - sum = spu_madd(sum, xinv, spu_splats(STIRLING_10)); - sum = spu_madd(sum, xinv, spu_splats(STIRLING_09)); - sum = spu_madd(sum, xinv, spu_splats(STIRLING_08)); - sum = spu_madd(sum, xinv, spu_splats(STIRLING_07)); - sum = spu_madd(sum, xinv, spu_splats(STIRLING_06)); - sum = spu_madd(sum, xinv, spu_splats(STIRLING_05)); - sum = spu_madd(sum, xinv, spu_splats(STIRLING_04)); - sum = spu_madd(sum, xinv, spu_splats(STIRLING_03)); - sum = spu_madd(sum, xinv, spu_splats(STIRLING_02)); - sum = spu_madd(sum, xinv, spu_splats(STIRLING_01)); - sum = spu_madd(sum, xinv, spu_splats(STIRLING_00)); - - sum = spu_mul(sum, sqrt2pi); - sum = spu_mul(sum, _powd2(x, spu_sub(x, halfd))); - sresult = spu_mul(sum, _expd2(spu_or(x, signbit))); - - /* - * Choose rational approximation or Stirling's result. - */ - result = spu_sel(rresult, sresult, gt9p9); - - - result = spu_sel(result, inf, gt200); - - /* For x < 0, use: - * - * gamma(x) = pi/(x*gamma(-x)*sin(x*pi)) - * or - * gamma(x) = pi/(gamma(1 - x)*sin(x*pi)) - */ - nresult = _divd2(pi, spu_mul(x, spu_mul(result, _sind2(spu_mul(x, pi))))); - result = spu_sel(nresult, result, gt0); - - /* - * x = non-positive integer, return NaN. - */ - result = spu_sel(result, nan, spu_andc(spu_cmpeq(x, xtrunc), gt0)); - - - return result; -} - -#endif /* _TGAMMAD2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/tgammaf.h b/newlib/libm/machine/spu/headers/tgammaf.h deleted file mode 100644 index a30928c60..000000000 --- a/newlib/libm/machine/spu/headers/tgammaf.h +++ /dev/null @@ -1,29 +0,0 @@ -#include -#include "headers/truncf4.h" -#include "headers/tgammaf4.h" - -static __inline float _tgammaf(float x) -{ - float res; - vector float vx; - vector float truncx; - vector float vc = { 0.0, 0.0 }; - vector unsigned int cmpres; - vector signed int verrno, ferrno; - vector signed int fail = { EDOM, EDOM, EDOM, EDOM }; - - vx = spu_promote(x, 0); - res = spu_extract(_tgammaf4(vx), 0); -#ifndef _IEEE_LIBM - /* - * use vector truncf4 rather than splat x, and splat truncx. - */ - truncx = _truncf4(vx); - cmpres = spu_cmpeq(truncx, vx); - verrno = spu_splats(errno); - ferrno = spu_sel(verrno, fail, (vector unsigned int) cmpres); - cmpres = spu_cmpgt(vc, vx); - errno = spu_extract(spu_sel(verrno, ferrno, (vector unsigned int) cmpres), 0); -#endif - return res; -} diff --git a/newlib/libm/machine/spu/headers/tgammaf4.h b/newlib/libm/machine/spu/headers/tgammaf4.h deleted file mode 100644 index 4f10d8c13..000000000 --- a/newlib/libm/machine/spu/headers/tgammaf4.h +++ /dev/null @@ -1,241 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _TGAMMAF4_H_ -#define _TGAMMAF4_H_ 1 - -#include -#include "simdmath.h" - -#include "recipf4.h" -#include "truncf4.h" -#include "expf4.h" -#include "logf4.h" -#include "divf4.h" -#include "sinf4.h" -#include "powf4.h" -#include "tgammad2.h" - -/* - * FUNCTION - * vector float _tgammaf4(vector float x) - * - * DESCRIPTION - * The tgammaf4 function returns a vector containing tgamma for each - * element of x - * - * We take a fairly standard approach - break the domain into 5 separate regions: - * - * 1. [-infinity, 0) - use gamma(x) = pi/(x*gamma(-x)*sin(x*pi)) - * 2. [0, 1) - push x into [1,2), then adjust the - * result. - * 3. [1, 2) - use a rational approximation. - * 4. [2, 10) - pull back into [1, 2), then adjust - * the result. - * 5. [10, +infinity] - use Stirling's Approximation. - * - * - * Special Cases: - * - tgamma(+/- 0) returns +/- infinity - * - tgamma(negative integer) returns NaN - * - tgamma(-infinity) returns NaN - * - tgamma(infinity) returns infinity - * - */ - -/* - * Coefficients for Stirling's Series for Gamma() are defined in - * tgammad2.h - */ - -/* - * Rational Approximation Coefficients for the - * domain [1, 2) are defined in tgammad2.h - */ - - -static __inline vector float _tgammaf4(vector float x) -{ - vector float signbit = spu_splats(-0.0f); - vector float zerof = spu_splats(0.0f); - vector float halff = spu_splats(0.5f); - vector float onef = spu_splats(1.0f); - vector float ninep9f = (vector float)spu_splats(0x411FFFFF); /* Next closest to 10.0 */ - vector float t38f = spu_splats(38.0f); - vector float pi = spu_splats((float)SM_PI); - vector float sqrt2pi = spu_splats(2.506628274631000502415765284811f); - vector float inf = (vec_float4)spu_splats(0x7F800000); - vector float nan = (vec_float4)spu_splats(0x7FFFFFFF); - - vector float xabs; - vector float xscaled; - vector float xtrunc; - vector float xinv; - vector float nresult; /* Negative x result */ - vector float rresult; /* Rational Approx result */ - vector float sresult; /* Stirling's result */ - vector float result; - vector float pr,qr; - - vector unsigned int gt0 = spu_cmpgt(x, zerof); - vector unsigned int gt1 = spu_cmpgt(x, onef); - vector unsigned int gt9p9 = spu_cmpgt(x, ninep9f); - vector unsigned int gt38 = spu_cmpgt(x, t38f); - - xabs = spu_andc(x, signbit); - - /* - * For x in [0, 1], add 1 to x, use rational - * approximation, then use: - * - * gamma(x) = gamma(x+1)/x - * - */ - xabs = spu_sel(spu_add(xabs, onef), xabs, gt1); - xtrunc = _truncf4(xabs); - - - /* - * For x in [2, 10): - */ - xscaled = spu_add(onef, spu_sub(xabs, xtrunc)); - - /* - * For x in [1,2), use a rational approximation. - */ - pr = spu_madd(xscaled, spu_splats((float)TGD2_P07), spu_splats((float)TGD2_P06)); - pr = spu_madd(pr, xscaled, spu_splats((float)TGD2_P05)); - pr = spu_madd(pr, xscaled, spu_splats((float)TGD2_P04)); - pr = spu_madd(pr, xscaled, spu_splats((float)TGD2_P03)); - pr = spu_madd(pr, xscaled, spu_splats((float)TGD2_P02)); - pr = spu_madd(pr, xscaled, spu_splats((float)TGD2_P01)); - pr = spu_madd(pr, xscaled, spu_splats((float)TGD2_P00)); - - qr = spu_madd(xscaled, spu_splats((float)TGD2_Q07), spu_splats((float)TGD2_Q06)); - qr = spu_madd(qr, xscaled, spu_splats((float)TGD2_Q05)); - qr = spu_madd(qr, xscaled, spu_splats((float)TGD2_Q04)); - qr = spu_madd(qr, xscaled, spu_splats((float)TGD2_Q03)); - qr = spu_madd(qr, xscaled, spu_splats((float)TGD2_Q02)); - qr = spu_madd(qr, xscaled, spu_splats((float)TGD2_Q01)); - qr = spu_madd(qr, xscaled, spu_splats((float)TGD2_Q00)); - - rresult = _divf4(pr, qr); - rresult = spu_sel(_divf4(rresult, x), rresult, gt1); - - /* - * If x was in [2,10) and we pulled it into [1,2), we need to push - * it back out again. - */ - rresult = spu_sel(rresult, spu_mul(rresult, xscaled), spu_cmpgt(x, xscaled)); /* [2,3) */ - xscaled = spu_add(xscaled, onef); - rresult = spu_sel(rresult, spu_mul(rresult, xscaled), spu_cmpgt(x, xscaled)); /* [3,4) */ - xscaled = spu_add(xscaled, onef); - rresult = spu_sel(rresult, spu_mul(rresult, xscaled), spu_cmpgt(x, xscaled)); /* [4,5) */ - xscaled = spu_add(xscaled, onef); - rresult = spu_sel(rresult, spu_mul(rresult, xscaled), spu_cmpgt(x, xscaled)); /* [5,6) */ - xscaled = spu_add(xscaled, onef); - rresult = spu_sel(rresult, spu_mul(rresult, xscaled), spu_cmpgt(x, xscaled)); /* [6,7) */ - xscaled = spu_add(xscaled, onef); - rresult = spu_sel(rresult, spu_mul(rresult, xscaled), spu_cmpgt(x, xscaled)); /* [7,8) */ - xscaled = spu_add(xscaled, onef); - rresult = spu_sel(rresult, spu_mul(rresult, xscaled), spu_cmpgt(x, xscaled)); /* [8,9) */ - xscaled = spu_add(xscaled, onef); - rresult = spu_sel(rresult, spu_mul(rresult, xscaled), spu_cmpgt(x, xscaled)); /* [9,10) */ - - - /* - * For x >= 10, we use Stirling's Approximation - */ - vector float sum; - xinv = _recipf4(xabs); - sum = spu_madd(xinv, spu_splats((float)STIRLING_16), spu_splats((float)STIRLING_15)); - sum = spu_madd(sum, xinv, spu_splats((float)STIRLING_14)); - sum = spu_madd(sum, xinv, spu_splats((float)STIRLING_13)); - sum = spu_madd(sum, xinv, spu_splats((float)STIRLING_12)); - sum = spu_madd(sum, xinv, spu_splats((float)STIRLING_11)); - sum = spu_madd(sum, xinv, spu_splats((float)STIRLING_10)); - sum = spu_madd(sum, xinv, spu_splats((float)STIRLING_09)); - sum = spu_madd(sum, xinv, spu_splats((float)STIRLING_08)); - sum = spu_madd(sum, xinv, spu_splats((float)STIRLING_07)); - sum = spu_madd(sum, xinv, spu_splats((float)STIRLING_06)); - sum = spu_madd(sum, xinv, spu_splats((float)STIRLING_05)); - sum = spu_madd(sum, xinv, spu_splats((float)STIRLING_04)); - sum = spu_madd(sum, xinv, spu_splats((float)STIRLING_03)); - sum = spu_madd(sum, xinv, spu_splats((float)STIRLING_02)); - sum = spu_madd(sum, xinv, spu_splats((float)STIRLING_01)); - sum = spu_madd(sum, xinv, spu_splats((float)STIRLING_00)); - - sum = spu_mul(sum, sqrt2pi); - sum = spu_mul(sum, _powf4(x, spu_sub(x, halff))); - sresult = spu_mul(sum, _expf4(spu_or(x, signbit))); - - /* - * Choose rational approximation or Stirling's result. - */ - result = spu_sel(rresult, sresult, gt9p9); - - result = spu_sel(result, inf, gt38); - - /* For x < 0, use: - * gamma(x) = pi/(x*gamma(-x)*sin(x*pi)) - */ - nresult = _divf4(pi, spu_mul(x, spu_mul(result, _sinf4(spu_mul(x, pi))))); - result = spu_sel(nresult, result, gt0); - - /* - * x = non-positive integer, return NaN. - */ - result = spu_sel(result, nan, spu_andc(spu_cmpeq(x, xtrunc), gt0)); - - return result; -} - -#endif /* _TGAMMAF4_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/trunc.h b/newlib/libm/machine/spu/headers/trunc.h deleted file mode 100644 index 1c503c515..000000000 --- a/newlib/libm/machine/spu/headers/trunc.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _TRUNC_H_ -#define _TRUNC_H_ 1 - -#include -#include "headers/vec_literal.h" - -/* Truncate the input downwards to the nearest integer. - */ -static __inline double _trunc(double x) -{ - vec_uchar16 splat_hi = VEC_LITERAL(vec_uchar16, 0,1,2,3,0,1,2,3, 8,9,10,11, 8,9,10,11); - vec_int4 exp, shift; - vec_uint4 sign = VEC_LITERAL(vec_uint4, 0x80000000, 0, 0x80000000, 0); - vec_uint4 or_mask, and_mask, mask; - vec_double2 in, in_hi, out; - - in = spu_promote(x, 0); - - /* Construct a mask to remove the fraction bits. The mask - * depends on the exponent of the floating point - * input value. - */ - in_hi = spu_shuffle(in, in, splat_hi); - exp = spu_and(spu_rlmask((vec_int4)in_hi, -20), 0x7FF); - - shift = spu_sub(VEC_LITERAL(vec_int4, 1023, 1043, 1023, 1043), exp); - or_mask = spu_andc(spu_cmpgt(shift, 0), sign); - - and_mask = spu_rlmask(VEC_LITERAL(vec_uint4, 0xFFFFF, -1, 0xFFFFF, -1), shift); - mask = spu_or(spu_and(and_mask, spu_cmpgt(shift, -31)), or_mask); - - /* Apply the mask and return the result. - */ - out = spu_andc(in, (vec_double2)(mask)); - - return (spu_extract(out, 0)); -} -#endif /* _TRUNC_H_ */ diff --git a/newlib/libm/machine/spu/headers/truncd2.h b/newlib/libm/machine/spu/headers/truncd2.h deleted file mode 100644 index 9dab7f24c..000000000 --- a/newlib/libm/machine/spu/headers/truncd2.h +++ /dev/null @@ -1,98 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _TRUNCD2_H_ -#define _TRUNCD2_H_ 1 - -#include - -/* - * FUNCTION - * vector double _truncd2(vector double x) - * - * DESCRIPTION - * The _truncd2 function truncates the elements of the input vector - * downwards (towards zero) to the nearest integer. - * - */ -static __inline vector double _truncd2(vector double in) -{ - vec_uchar16 splat_hi = (vec_uchar16) { 0,1,2,3,0,1,2,3, 8,9,10,11, 8,9,10,11 }; - vec_int4 exp, shift; - vec_uint4 sign = (vec_uint4) { 0x80000000, 0, 0x80000000, 0 }; - vec_uint4 or_mask, and_mask, mask; - vec_double2 in_hi, out; - - /* Construct a mask to remove the fraction bits. The mask - * depends on the exponent of the floating point - * input value. - */ - in_hi = spu_shuffle(in, in, splat_hi); - exp = spu_and(spu_rlmask((vec_int4)in_hi, -20), 0x7FF); - - shift = spu_sub(((vec_int4) { 1023, 1043, 1023, 1043 }), exp); - or_mask = spu_andc(spu_cmpgt(shift, 0), sign); - - and_mask = spu_rlmask(((vec_uint4) { 0xFFFFF, -1, 0xFFFFF, -1 }), shift); - mask = spu_or(spu_and(and_mask, spu_cmpgt(shift, -32)), or_mask); - - /* Apply the mask and return the result. - */ - out = spu_andc(in, (vec_double2)(mask)); - - return (out); -} - - -#endif /* _TRUNCD2_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/truncf.h b/newlib/libm/machine/spu/headers/truncf.h deleted file mode 100644 index 2b360452a..000000000 --- a/newlib/libm/machine/spu/headers/truncf.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _TRUNCF_H_ -#define _TRUNCF_H_ 1 - -#include -#include "headers/vec_literal.h" - -static __inline float _truncf(float x) -{ - vec_int4 exp; - vec_uint4 or_mask, and_mask, mask; - vec_float4 in, out; - - in = spu_promote(x, 0); - - /* Construct a mask to remove the fraction bits. The mask - * depends on the exponent of the floating point - * input value. - */ - exp = spu_sub(127, spu_and(spu_rlmask((vec_int4)in, -23), 0xFF)); - - or_mask = spu_cmpgt(exp, 0); - and_mask = spu_rlmask(VEC_SPLAT_U32(0x7FFFFF), exp); - - mask = spu_or(spu_and(and_mask, spu_cmpgt(exp, -31)), or_mask); - - /* Apply the mask and return the result. - */ - out = spu_andc(in, (vec_float4)(mask)); - - return (spu_extract(out, 0)); -} -#endif /* _TRUNCF_H_ */ diff --git a/newlib/libm/machine/spu/headers/truncf4.h b/newlib/libm/machine/spu/headers/truncf4.h deleted file mode 100644 index 51c2ac5df..000000000 --- a/newlib/libm/machine/spu/headers/truncf4.h +++ /dev/null @@ -1,91 +0,0 @@ -/* -------------------------------------------------------------- */ -/* (C)Copyright 2006,2007, */ -/* International Business Machines Corporation, */ -/* Sony Computer Entertainment, Incorporated, */ -/* Toshiba Corporation, */ -/* */ -/* 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 must retain the above copyright*/ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* - Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* - Neither the name of IBM Corporation nor the names of its */ -/* contributors may be used to endorse or promote products */ -/* derived from this software without specific prior written */ -/* permission. */ -/* Redistributions of source code must retain the above copyright */ -/* notice, this list of conditions and the following disclaimer. */ -/* */ -/* Redistributions in binary form must reproduce the above */ -/* copyright notice, this list of conditions and the following */ -/* disclaimer in the documentation and/or other materials */ -/* provided with the distribution. */ -/* */ -/* Neither the name of IBM Corporation 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 COPYRIGHT HOLDERS AND */ -/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ -/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ -/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ -/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 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. */ -/* -------------------------------------------------------------- */ -/* PROLOG END TAG zYx */ -#ifdef __SPU__ -#ifndef _TRUNCF4_H_ -#define _TRUNCF4_H_ 1 - -#include - -/* - * FUNCTION - * vector float _truncf4(vector float x) - * - * DESCRIPTION - * The _truncf4 function truncates the elements of the input vector - * downwards (towards zero) to the nearest integer. - * - */ -static __inline vector float _truncf4(vector float x) -{ - vec_int4 exp; - vec_uint4 or_mask, and_mask, mask; - vec_float4 out; - - // Construct a mask to remove the fraction bits. The mask - // depends on the exponent of the floating point - // input value. - exp = spu_sub(127, spu_and(spu_rlmask((vec_int4) x, -23), 0xFF)); - - // Be sure to always preserve the sign bit - or_mask = spu_rlmask(spu_cmpgt(exp, 0),-1); - - and_mask = spu_rlmask(spu_splats((unsigned int)0x7FFFFF), exp); - mask = spu_or(spu_and(and_mask, spu_cmpgt(exp, -31)), or_mask); - - // Apply the mask and return the result. - - out = spu_andc(x, (vec_float4) (mask)); - return (out); -} -#endif /* _TRUNCF4_H_ */ -#endif /* __SPU__ */ diff --git a/newlib/libm/machine/spu/headers/vec_literal.h b/newlib/libm/machine/spu/headers/vec_literal.h deleted file mode 100644 index 0098fee54..000000000 --- a/newlib/libm/machine/spu/headers/vec_literal.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - (C) Copyright 2001,2006, - International Business Machines Corporation, - Sony Computer Entertainment, Incorporated, - Toshiba Corporation, - - 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 must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the names of the copyright holders nor the names of their - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - 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. -*/ -#ifndef _VEC_LITERAL_H_ -#define _VEC_LITERAL_H_ - -/* This header files provides an abstraction for the various implementations - * of vector literal construction. The two formats are: - * - * 1) Altivec styled using parenthesis - * 2) C grammer friendly styled using curly braces - * - * The macro, VEC_LITERAL has been developed to provide some portability - * in these two styles. To achieve true portability, user must specify all - * elements of the vector being initialized. A single element can be provided - * but only the first element guarenteed across both construction styles. - * - * The VEC_SPLAT_* macros have been provided for portability of vector literal - * construction when all the elements of the vector contain the same value. - */ - -#include - -#ifdef __ALTIVEC_LITERAL_STYLE__ -/* Use altivec style. - */ -#define VEC_LITERAL(_type, ...) ((_type)(__VA_ARGS__)) - -#define VEC_SPLAT_U8(_val) ((vector unsigned char)(_val)) -#define VEC_SPLAT_S8(_val) ((vector signed char)(_val)) - -#define VEC_SPLAT_U16(_val) ((vector unsigned short)(_val)) -#define VEC_SPLAT_S16(_val) ((vector signed short)(_val)) - -#define VEC_SPLAT_U32(_val) ((vector unsigned int)(_val)) -#define VEC_SPLAT_S32(_val) ((vector signed int)(_val)) -#define VEC_SPLAT_F32(_val) ((vector float)(_val)) - -#define VEC_SPLAT_U64(_val) ((vector unsigned long long)(_val)) -#define VEC_SPLAT_S64(_val) ((vector signed long long)(_val)) -#define VEC_SPLAT_F64(_val) ((vector double)(_val)) - -#else -/* Use curly brace style. - */ -#define VEC_LITERAL(_type, ...) ((_type){__VA_ARGS__}) - -#define VEC_SPLAT_U8(_val) ((vector unsigned char){_val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val}) -#define VEC_SPLAT_S8(_val) ((vector signed char){_val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val, _val}) - -#define VEC_SPLAT_U16(_val) ((vector unsigned short){_val, _val, _val, _val, _val, _val, _val, _val}) -#define VEC_SPLAT_S16(_val) ((vector signed short){_val, _val, _val, _val, _val, _val, _val, _val}) - -#define VEC_SPLAT_U32(_val) ((vector unsigned int){_val, _val, _val, _val}) -#define VEC_SPLAT_S32(_val) ((vector signed int){_val, _val, _val, _val}) -#define VEC_SPLAT_F32(_val) ((vector float){_val, _val, _val, _val}) - -#define VEC_SPLAT_U64(_val) ((vector unsigned long long){_val, _val}) -#define VEC_SPLAT_S64(_val) ((vector signed long long){_val, _val}) -#define VEC_SPLAT_F64(_val) ((vector double){_val, _val}) - -#endif - -#endif /* _VEC_LITERAL_H_ */ -- cgit v1.2.3