From 07b4b67a88f386ce4716a14e0ff2c2bce992b985 Mon Sep 17 00:00:00 2001 From: cvs2svn <> Date: Thu, 4 Sep 2008 20:26:21 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'newlib-1_16_0'. Sprout from binutils-arc-20080908-branch 2008-09-04 20:26:19 UTC cvs2svn 'This commit was manufactured by cvs2svn to create branch 'binutils-' Cherrypick from master 2007-12-19 22:36:48 UTC Jeff Johnston '': ChangeLog MAINTAINERS Makefile.def Makefile.in Makefile.tpl config.guess config.rpath config.sub config/ChangeLog config/acinclude.m4 config/acx.m4 config/confsubdir.m4 config/mh-i370pic config/mh-ia64pic config/mh-mingw config/mh-ppc-darwin config/mh-s390pic config/mh-sparcpic config/mt-mips-elfoabi config/mt-spu config/tls.m4 configure configure.ac libgloss/ChangeLog libgloss/arm/configure libgloss/arm/crt0.S libgloss/arm/redboot-syscalls.c libgloss/bfin/Makefile.in libgloss/bfin/configure libgloss/bfin/syscalls.c libgloss/configure libgloss/cris/configure libgloss/cris/gensyscalls libgloss/crx/configure libgloss/d30v/configure libgloss/doc/configure libgloss/fr30/configure libgloss/fr30/syscalls.c libgloss/frv/configure libgloss/frv/crt0.S libgloss/frv/isatty.c libgloss/hp74x/configure libgloss/i386/configure libgloss/i960/configure libgloss/iq2000/configure libgloss/iq2000/crt0.S libgloss/iq2000/isatty.c libgloss/libnosys/configure libgloss/libnosys/configure.in libgloss/libnosys/isatty.c libgloss/m32c/configure libgloss/m32c/exit.S libgloss/m32r/configure libgloss/m32r/isatty.c libgloss/m68hc11/configure libgloss/m68k/cf-crt1.c libgloss/m68k/configure libgloss/mcore/configure libgloss/mep/configure libgloss/mips/configure libgloss/mn10200/configure libgloss/mn10200/isatty.c libgloss/mn10300/configure libgloss/mn10300/crt0.S libgloss/mn10300/isatty.c libgloss/mt/configure libgloss/pa/configure libgloss/rs6000/configure libgloss/sparc/configure libgloss/sparc/libsys/configure libgloss/spu/Makefile.in libgloss/spu/configure libgloss/spu/readlink.c libgloss/spu/sbrk.c libgloss/spu/syscalls.c libgloss/wince/configure libgloss/xstormy16/configure libtool.m4 ltsugar.m4 newlib/ChangeLog newlib/Makefile.am newlib/Makefile.in newlib/configure.host newlib/libc/argz/argz_count.c newlib/libc/argz/argz_extract.c newlib/libc/argz/argz_stringify.c newlib/libc/ctype/ctype_.c newlib/libc/ctype/isalnum.c newlib/libc/ctype/isalpha.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/isxdigit.c newlib/libc/include/_ansi.h newlib/libc/include/_syslist.h newlib/libc/include/assert.h newlib/libc/include/ctype.h newlib/libc/include/getopt.h newlib/libc/include/machine/_default_types.h newlib/libc/include/machine/ieeefp.h newlib/libc/include/machine/setjmp.h newlib/libc/include/math.h newlib/libc/include/reent.h newlib/libc/include/stdint.h newlib/libc/include/stdio.h newlib/libc/include/string.h newlib/libc/include/sys/_default_fcntl.h newlib/libc/include/sys/reent.h newlib/libc/include/sys/stat.h newlib/libc/include/sys/unistd.h newlib/libc/libc.texinfo newlib/libc/machine/arm/setjmp.S newlib/libc/machine/configure newlib/libc/machine/i386/memchr.S newlib/libc/machine/i386/memset.S newlib/libc/machine/i386/strchr.S newlib/libc/machine/i386/strlen.S newlib/libc/machine/m68k/memcpy.S newlib/libc/machine/m68k/memset.S newlib/libc/machine/m68k/setjmp.S newlib/libc/machine/mips/strncpy.c newlib/libc/machine/mn10300/memset.S newlib/libc/machine/powerpc/vfprintf.c newlib/libc/machine/spu/Makefile.am newlib/libc/machine/spu/Makefile.in newlib/libc/machine/spu/fprintf.S newlib/libc/machine/spu/fscanf.S newlib/libc/machine/spu/mk_syscalls newlib/libc/machine/spu/printf.S newlib/libc/machine/spu/scanf.S newlib/libc/machine/spu/setjmp.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/strcat.c newlib/libc/machine/spu/strcpy.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/sys/dirent.h newlib/libc/machine/spu/sys/errno.h newlib/libc/machine/spu/sys/sched.h newlib/libc/machine/spu/sys/syscall.h newlib/libc/posix/Makefile.am newlib/libc/posix/Makefile.in newlib/libc/posix/isatty.c newlib/libc/reent/Makefile.am newlib/libc/reent/Makefile.in newlib/libc/search/hash.h 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/dprintf.c newlib/libc/stdio/fflush.c newlib/libc/stdio/freopen.c newlib/libc/stdio/ftell.c newlib/libc/stdio/local.h newlib/libc/stdio/makebuf.c newlib/libc/stdio/rget.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/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/vfprintf.c newlib/libc/stdio/vfscanf.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/stdio64/ftello64.c newlib/libc/stdlib/envlock.h newlib/libc/stdlib/gdtoa-hexnan.c newlib/libc/stdlib/getopt.c newlib/libc/stdlib/mprec.h newlib/libc/stdlib/strtod.c newlib/libc/stdlib/wcsrtombs.c newlib/libc/string/Makefile.am newlib/libc/string/Makefile.in newlib/libc/string/memchr.c newlib/libc/string/memset.c newlib/libc/string/strcasestr.c newlib/libc/string/strchr.c newlib/libc/string/strings.tex newlib/libc/string/strlen.c newlib/libc/string/strstr.c newlib/libc/sys/a29khif/_isatty.S newlib/libc/sys/arc/isatty.c newlib/libc/sys/arm/syscalls.c newlib/libc/sys/configure newlib/libc/sys/d10v/syscalls.c newlib/libc/sys/h8300hms/syscalls.c newlib/libc/sys/h8500hms/syscalls.c newlib/libc/sys/linux/Makefile.am newlib/libc/sys/linux/Makefile.in newlib/libc/sys/linux/bits/libc-lock.h newlib/libc/sys/linux/iconv/iconvconfig.c newlib/libc/sys/linux/iconv/strtab.c newlib/libc/sys/linux/include/arpa/nameser.h newlib/libc/sys/linux/include/hesiod.h newlib/libc/sys/linux/include/libc_private.h newlib/libc/sys/linux/include/net/ethernet.h newlib/libc/sys/linux/include/net/if_atm.h newlib/libc/sys/linux/include/net/if_media.h newlib/libc/sys/linux/include/net/if_ppp.h newlib/libc/sys/linux/include/net/if_pppvar.h newlib/libc/sys/linux/include/netdb.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/ip_flow.h newlib/libc/sys/linux/include/nsswitch.h newlib/libc/sys/linux/include/resolv.h newlib/libc/sys/linux/include/sched.h newlib/libc/sys/linux/include/stdint.h newlib/libc/sys/linux/intl/locale.alias newlib/libc/sys/linux/libc-symbols.h newlib/libc/sys/linux/machine/i386/get_clockfreq.c newlib/libc/sys/linux/machine/i386/include/endian.h newlib/libc/sys/linux/machine/i386/include/param.h 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/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/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_lnaof.c newlib/libc/sys/linux/net/inet_makeaddr.c newlib/libc/sys/linux/net/inet_net.3 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/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/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/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/vars.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/sys/ioctl.h newlib/libc/sys/linux/sys/socket.h newlib/libc/sys/linux/sys/types.h newlib/libc/sys/linux/sys/unistd.h newlib/libc/sys/mmixware/isatty.c newlib/libc/sys/sh/syscalls.c newlib/libc/sys/sysnecv850/crt0.S newlib/libc/sys/sysnecv850/isatty.c 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/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/mktime.c newlib/libm/libm.texinfo newlib/libm/machine/spu/configure newlib/libm/machine/spu/headers/acosd2.h newlib/libm/machine/spu/headers/acosf4.h newlib/libm/machine/spu/headers/acoshd2.h newlib/libm/machine/spu/headers/acoshf4.h newlib/libm/machine/spu/headers/asind2.h newlib/libm/machine/spu/headers/asinf4.h newlib/libm/machine/spu/headers/asinhd2.h newlib/libm/machine/spu/headers/asinhf4.h newlib/libm/machine/spu/headers/atan2d2.h newlib/libm/machine/spu/headers/atan2f4.h newlib/libm/machine/spu/headers/atand2.h newlib/libm/machine/spu/headers/atanf4.h newlib/libm/machine/spu/headers/atanhd2.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/cos_sin.h newlib/libm/machine/spu/headers/cosd2.h newlib/libm/machine/spu/headers/cosf4.h newlib/libm/machine/spu/headers/coshd2.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/erf_utils.h newlib/libm/machine/spu/headers/erfcd2.h newlib/libm/machine/spu/headers/erfcf4.h newlib/libm/machine/spu/headers/erfd2.h newlib/libm/machine/spu/headers/erff4.h newlib/libm/machine/spu/headers/exp2d2.h newlib/libm/machine/spu/headers/exp2f4.h newlib/libm/machine/spu/headers/expd2.h newlib/libm/machine/spu/headers/expf4.h newlib/libm/machine/spu/headers/expm1d2.h newlib/libm/machine/spu/headers/expm1f4.h newlib/libm/machine/spu/headers/floord2.h newlib/libm/machine/spu/headers/floorf4.h newlib/libm/machine/spu/headers/hypotd2.h newlib/libm/machine/spu/headers/hypotf4.h newlib/libm/machine/spu/headers/isnand2.h newlib/libm/machine/spu/headers/isnanf4.h newlib/libm/machine/spu/headers/ldexpd2.h newlib/libm/machine/spu/headers/ldexpf4.h newlib/libm/machine/spu/headers/lgammad2.h newlib/libm/machine/spu/headers/lgammaf4.h newlib/libm/machine/spu/headers/log10d2.h newlib/libm/machine/spu/headers/log1pd2.h newlib/libm/machine/spu/headers/log1pf4.h newlib/libm/machine/spu/headers/log2d2.h newlib/libm/machine/spu/headers/log2f4.h newlib/libm/machine/spu/headers/logbf4.h newlib/libm/machine/spu/headers/logd2.h newlib/libm/machine/spu/headers/logf4.h newlib/libm/machine/spu/headers/nearbyintf4.h newlib/libm/machine/spu/headers/nextafterd2.h newlib/libm/machine/spu/headers/nextafterf4.h newlib/libm/machine/spu/headers/powd2.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/rintf4.h newlib/libm/machine/spu/headers/scalbnf4.h newlib/libm/machine/spu/headers/signbitd2.h newlib/libm/machine/spu/headers/simdmath.h newlib/libm/machine/spu/headers/sincosd2.h newlib/libm/machine/spu/headers/sincosf4.h newlib/libm/machine/spu/headers/sind2.h newlib/libm/machine/spu/headers/sinf4.h newlib/libm/machine/spu/headers/sinhd2.h newlib/libm/machine/spu/headers/sinhf4.h newlib/libm/machine/spu/headers/sqrtd2.h newlib/libm/machine/spu/headers/sqrtf4.h newlib/libm/machine/spu/headers/tand2.h newlib/libm/machine/spu/headers/tanf4.h newlib/libm/machine/spu/headers/tanhd2.h newlib/libm/machine/spu/headers/tanhf4.h newlib/libm/machine/spu/headers/tgammad2.h newlib/libm/machine/spu/headers/tgammaf4.h newlib/libm/machine/spu/headers/truncd2.h newlib/libm/machine/spu/headers/truncf4.h src-release Cherrypick from cygnus 1999-05-03 07:29:06 UTC Richard Henderson '19990502 sourceware import': config/mh-armpic config/mh-elfalphapic config/mh-m68kpic config/mh-papic config/mh-ppcpic config/mh-x86pic Delete: config/extensions.m4 config/futex.m4 config/mh-pa config/mh-pa-hpux10 config/mt-mips-gnu config/mt-mips16-compat config/override.m4 config/proginstall.m4 config/tcl.m4 libgloss/bfin/basiccrt.S libgloss/bfin/bf522.ld libgloss/bfin/bf523.ld libgloss/bfin/bf524.ld libgloss/bfin/bf525.ld libgloss/bfin/bf526.ld libgloss/bfin/bf527.ld libgloss/bfin/bf531.ld libgloss/bfin/bf532.ld libgloss/bfin/bf533.ld libgloss/bfin/bf534.ld libgloss/bfin/bf536.ld libgloss/bfin/bf537.ld libgloss/bfin/bf538.ld libgloss/bfin/bf539.ld libgloss/bfin/bf542.ld libgloss/bfin/bf544.ld libgloss/bfin/bf547.ld libgloss/bfin/bf548.ld libgloss/bfin/bf549.ld libgloss/bfin/bf561.ld libgloss/bfin/bf561a.ld libgloss/bfin/bf561b.ld libgloss/bfin/bf561m.ld libgloss/bfin/bfin-common-mc.ld libgloss/bfin/bfin-common-sc.ld libgloss/bfin/include/blackfin.h libgloss/bfin/include/cdefBF522.h libgloss/bfin/include/cdefBF525.h libgloss/bfin/include/cdefBF527.h libgloss/bfin/include/cdefBF52x_base.h libgloss/bfin/include/cdefBF531.h libgloss/bfin/include/cdefBF532.h libgloss/bfin/include/cdefBF533.h libgloss/bfin/include/cdefBF534.h libgloss/bfin/include/cdefBF535.h libgloss/bfin/include/cdefBF536.h libgloss/bfin/include/cdefBF537.h libgloss/bfin/include/cdefBF538.h libgloss/bfin/include/cdefBF539.h libgloss/bfin/include/cdefBF53x.h libgloss/bfin/include/cdefBF541.h libgloss/bfin/include/cdefBF542.h libgloss/bfin/include/cdefBF544.h libgloss/bfin/include/cdefBF547.h libgloss/bfin/include/cdefBF548.h libgloss/bfin/include/cdefBF549.h libgloss/bfin/include/cdefBF54x_base.h libgloss/bfin/include/cdefBF561.h libgloss/bfin/include/cdef_LPBlackfin.h libgloss/bfin/include/cdefblackfin.h libgloss/bfin/include/cplb.h libgloss/bfin/include/cplbtab.h libgloss/bfin/include/defBF522.h libgloss/bfin/include/defBF525.h libgloss/bfin/include/defBF527.h libgloss/bfin/include/defBF52x_base.h libgloss/bfin/include/defBF531.h libgloss/bfin/include/defBF532.h libgloss/bfin/include/defBF533.h libgloss/bfin/include/defBF534.h libgloss/bfin/include/defBF535.h libgloss/bfin/include/defBF536.h libgloss/bfin/include/defBF537.h libgloss/bfin/include/defBF538.h libgloss/bfin/include/defBF539.h libgloss/bfin/include/defBF541.h libgloss/bfin/include/defBF542.h libgloss/bfin/include/defBF544.h libgloss/bfin/include/defBF547.h libgloss/bfin/include/defBF548.h libgloss/bfin/include/defBF549.h libgloss/bfin/include/defBF54x_base.h libgloss/bfin/include/defBF561.h libgloss/bfin/include/def_LPBlackfin.h libgloss/bfin/include/defblackfin.h libgloss/bfin/include/sys/_adi_platform.h libgloss/bfin/include/sys/anomaly_macros_rtl.h libgloss/bfin/include/sys/excause.h libgloss/bfin/include/sys/exception.h libgloss/bfin/include/sys/mc_typedef.h libgloss/bfin/include/sys/platform.h libgloss/bfin/include/sys/pll.h libgloss/bfin/include/sysreg.h libgloss/spu/linux_syscalls.c libgloss/xstormy16/isatty.c newlib/libc/machine/m68k/m68kasm.h newlib/libc/machine/spu/assert.c newlib/libc/machine/spu/impure.c newlib/libc/machine/spu/include/spu_timer.h newlib/libc/machine/spu/memcmp.c newlib/libc/machine/spu/spu_clock_stop.c newlib/libc/machine/spu/spu_clock_svcs.c newlib/libc/machine/spu/spu_timebase.c newlib/libc/machine/spu/spu_timer_flih.S newlib/libc/machine/spu/spu_timer_free.c newlib/libc/machine/spu/spu_timer_internal.h newlib/libc/machine/spu/spu_timer_slih.c newlib/libc/machine/spu/spu_timer_slih_reg.c newlib/libc/machine/spu/spu_timer_stop.c newlib/libc/machine/spu/spu_timer_svcs.c newlib/libc/machine/spu/straddr.h newlib/libc/machine/spu/strcpy.h newlib/libc/machine/spu/strncmp.h newlib/libc/machine/spu/sys/linux_syscalls.h newlib/libc/posix/_isatty.c newlib/libc/reent/isattyr.c newlib/libc/string/memmem.c newlib/libc/string/str-two-way.h newlib/libc/sys/linux/isatty.c newlib/libc/sys/linux/machine/i386/atomic.h newlib/libc/sys/linux/net/XXX-lookup.c newlib/libc/sys/linux/net/alias-lookup.c newlib/libc/sys/linux/net/aliases.h newlib/libc/sys/linux/net/check_pf.c newlib/libc/sys/linux/net/databases.def newlib/libc/sys/linux/net/digits_dots.c newlib/libc/sys/linux/net/ether_aton.c newlib/libc/sys/linux/net/ether_aton_r.c newlib/libc/sys/linux/net/ether_hton.c newlib/libc/sys/linux/net/ether_line.c newlib/libc/sys/linux/net/ether_ntoa.c newlib/libc/sys/linux/net/ether_ntoa_r.c newlib/libc/sys/linux/net/ether_ntoh.c newlib/libc/sys/linux/net/etherent.h newlib/libc/sys/linux/net/ethers-lookup.c newlib/libc/sys/linux/net/function.def newlib/libc/sys/linux/net/getXXbyYY.c newlib/libc/sys/linux/net/getXXbyYY_r.c newlib/libc/sys/linux/net/getXXent.c newlib/libc/sys/linux/net/getXXent_r.c newlib/libc/sys/linux/net/getaliasent.c newlib/libc/sys/linux/net/getaliasent_r.c newlib/libc/sys/linux/net/getaliasname.c newlib/libc/sys/linux/net/getaliasname_r.c newlib/libc/sys/linux/net/gethstbyad.c newlib/libc/sys/linux/net/gethstbyad_r.c newlib/libc/sys/linux/net/gethstbynm.c newlib/libc/sys/linux/net/gethstbynm2.c newlib/libc/sys/linux/net/gethstbynm2_r.c newlib/libc/sys/linux/net/gethstbynm_r.c newlib/libc/sys/linux/net/gethstent.c newlib/libc/sys/linux/net/gethstent_r.c newlib/libc/sys/linux/net/getnetbyad.c newlib/libc/sys/linux/net/getnetbyad_r.c newlib/libc/sys/linux/net/getnetbynm.c newlib/libc/sys/linux/net/getnetbynm_r.c newlib/libc/sys/linux/net/getnetent.c newlib/libc/sys/linux/net/getnetent_r.c newlib/libc/sys/linux/net/getnetgrent.c newlib/libc/sys/linux/net/getnetgrent_r.c newlib/libc/sys/linux/net/getnssent.c newlib/libc/sys/linux/net/getnssent_r.c newlib/libc/sys/linux/net/getproto_r.c newlib/libc/sys/linux/net/getprtent.c newlib/libc/sys/linux/net/getprtent_r.c newlib/libc/sys/linux/net/getprtname.c newlib/libc/sys/linux/net/getprtname_r.c newlib/libc/sys/linux/net/getrpcbyname.c newlib/libc/sys/linux/net/getrpcbyname_r.c newlib/libc/sys/linux/net/getrpcbynumber.c newlib/libc/sys/linux/net/getrpcbynumber_r.c newlib/libc/sys/linux/net/getrpcent.c newlib/libc/sys/linux/net/getrpcent_r.c newlib/libc/sys/linux/net/getservent_r.c newlib/libc/sys/linux/net/getsrvbynm.c newlib/libc/sys/linux/net/getsrvbynm_r.c newlib/libc/sys/linux/net/getsrvbypt.c newlib/libc/sys/linux/net/getsrvbypt_r.c newlib/libc/sys/linux/net/grp-lookup.c newlib/libc/sys/linux/net/herrno.c newlib/libc/sys/linux/net/hosts-lookup.c newlib/libc/sys/linux/net/ifaddrs.h newlib/libc/sys/linux/net/ifreq.c newlib/libc/sys/linux/net/ifreq.h newlib/libc/sys/linux/net/in6_addr.c newlib/libc/sys/linux/net/inet6_option.c newlib/libc/sys/linux/net/inet_mkadr.c newlib/libc/sys/linux/net/inet_net.c newlib/libc/sys/linux/net/key-lookup.c newlib/libc/sys/linux/net/local.h newlib/libc/sys/linux/net/netgroup.h newlib/libc/sys/linux/net/netgrp-lookup.c newlib/libc/sys/linux/net/network-lookup.c newlib/libc/sys/linux/net/not-cancel.h newlib/libc/sys/linux/net/ns_samedomain.c newlib/libc/sys/linux/net/nscd-types.h newlib/libc/sys/linux/net/nscd/nscd-client.h newlib/libc/sys/linux/net/nscd/nscd_proto.h newlib/libc/sys/linux/net/nss.h newlib/libc/sys/linux/net/nsswitch.c newlib/libc/sys/linux/net/nsswitch.h newlib/libc/sys/linux/net/opensock.c newlib/libc/sys/linux/net/proto-lookup.c newlib/libc/sys/linux/net/pwd-lookup.c newlib/libc/sys/linux/net/res_debug.h newlib/libc/sys/linux/net/res_hconf.c newlib/libc/sys/linux/net/res_hconf.h newlib/libc/sys/linux/net/res_libc.c newlib/libc/sys/linux/net/rexec.c newlib/libc/sys/linux/net/rpc-lookup.c newlib/libc/sys/linux/net/ruserpass.c newlib/libc/sys/linux/net/service-lookup.c newlib/libc/sys/linux/net/spwd-lookup.c newlib/libc/sys/linux/shlib-compat.h newlib/libc/syscalls/sysisatty.c newlib/testsuite/newlib.stdlib/size_max.c newlib/testsuite/newlib.stdlib/stdlib.exp --- newlib/libc/machine/spu/Makefile.am | 31 ++- newlib/libc/machine/spu/Makefile.in | 200 ++++++------------ newlib/libc/machine/spu/assert.c | 41 ---- newlib/libc/machine/spu/fprintf.S | 2 - newlib/libc/machine/spu/fscanf.S | 2 - newlib/libc/machine/spu/impure.c | 14 -- newlib/libc/machine/spu/include/spu_timer.h | 85 -------- newlib/libc/machine/spu/memcmp.c | 43 ---- newlib/libc/machine/spu/mk_syscalls | 3 - newlib/libc/machine/spu/printf.S | 2 - newlib/libc/machine/spu/scanf.S | 2 - newlib/libc/machine/spu/setjmp.S | 4 - newlib/libc/machine/spu/snprintf.S | 2 - newlib/libc/machine/spu/sprintf.S | 2 - newlib/libc/machine/spu/spu_clock_stop.c | 67 ------ newlib/libc/machine/spu/spu_clock_svcs.c | 93 --------- newlib/libc/machine/spu/spu_timebase.c | 51 ----- newlib/libc/machine/spu/spu_timer_flih.S | 152 -------------- newlib/libc/machine/spu/spu_timer_free.c | 86 -------- newlib/libc/machine/spu/spu_timer_internal.h | 140 ------------- newlib/libc/machine/spu/spu_timer_slih.c | 221 -------------------- newlib/libc/machine/spu/spu_timer_slih_reg.c | 72 ------- newlib/libc/machine/spu/spu_timer_stop.c | 101 --------- newlib/libc/machine/spu/spu_timer_svcs.c | 115 ----------- newlib/libc/machine/spu/sscanf.S | 2 - newlib/libc/machine/spu/stack_reg_va.S | 4 - newlib/libc/machine/spu/straddr.h | 75 ------- newlib/libc/machine/spu/strcat.c | 27 ++- newlib/libc/machine/spu/strcpy.c | 17 +- newlib/libc/machine/spu/strcpy.h | 184 ----------------- newlib/libc/machine/spu/strlen.c | 22 +- newlib/libc/machine/spu/strncat.c | 69 ++++++- newlib/libc/machine/spu/strncmp.c | 99 ++++++++- newlib/libc/machine/spu/strncmp.h | 155 -------------- newlib/libc/machine/spu/strncpy.c | 59 +++++- newlib/libc/machine/spu/sys/dirent.h | 6 - newlib/libc/machine/spu/sys/errno.h | 10 +- newlib/libc/machine/spu/sys/linux_syscalls.h | 294 --------------------------- newlib/libc/machine/spu/sys/sched.h | 6 - newlib/libc/machine/spu/sys/syscall.h | 6 - 40 files changed, 323 insertions(+), 2243 deletions(-) delete mode 100644 newlib/libc/machine/spu/assert.c delete mode 100644 newlib/libc/machine/spu/impure.c delete mode 100644 newlib/libc/machine/spu/include/spu_timer.h delete mode 100644 newlib/libc/machine/spu/memcmp.c delete mode 100644 newlib/libc/machine/spu/spu_clock_stop.c delete mode 100644 newlib/libc/machine/spu/spu_clock_svcs.c delete mode 100644 newlib/libc/machine/spu/spu_timebase.c delete mode 100644 newlib/libc/machine/spu/spu_timer_flih.S delete mode 100644 newlib/libc/machine/spu/spu_timer_free.c delete mode 100644 newlib/libc/machine/spu/spu_timer_internal.h delete mode 100644 newlib/libc/machine/spu/spu_timer_slih.c delete mode 100644 newlib/libc/machine/spu/spu_timer_slih_reg.c delete mode 100644 newlib/libc/machine/spu/spu_timer_stop.c delete mode 100644 newlib/libc/machine/spu/spu_timer_svcs.c delete mode 100644 newlib/libc/machine/spu/straddr.h delete mode 100644 newlib/libc/machine/spu/strcpy.h delete mode 100644 newlib/libc/machine/spu/strncmp.h delete mode 100644 newlib/libc/machine/spu/sys/linux_syscalls.h (limited to 'newlib/libc/machine/spu') diff --git a/newlib/libc/machine/spu/Makefile.am b/newlib/libc/machine/spu/Makefile.am index 070779140..47d826c94 100644 --- a/newlib/libc/machine/spu/Makefile.am +++ b/newlib/libc/machine/spu/Makefile.am @@ -8,26 +8,23 @@ noinst_LIBRARIES = lib.a AM_CCASFLAGS = $(INCLUDES) -lib_a_SOURCES = setjmp.S assert.c clearerr.c creat.c fclose.c feof.c \ - ferror.c fflush.c fgetc.c fgetpos.c fgets.c fileno.c fiprintf.S \ - fiscanf.S fopen.c fprintf.S fputc.c fputs.c fread.c freopen.c \ - fscanf.S fseek.c fsetpos.c ftell.c fwrite.c getc.c getchar.c \ - gets.c impure.c iprintf.S iscanf.S memcmp.c memcpy.c memmove.c \ - memset.c perror.c printf.S putc.c putchar.c puts.c remove.c \ - rename.c rewind.c scanf.S setbuf.c setvbuf.c siprintf.S siscanf.S \ - sleep.c sniprintf.S snprintf.S sprintf.S sscanf.S stdio.c strcat.c \ - strchr.c strcmp.c strcpy.c strcspn.c strlen.c strncat.c strncmp.c \ - strncpy.c strpbrk.c strrchr.c strspn.c strxfrm.c tmpfile.c \ - tmpnam.c ungetc.c usleep.c vfiprintf.c vfiscanf.c vfprintf.c \ - vfscanf.c viprintf.c viscanf.c vprintf.c vscanf.c vsiprintf.c \ - vsiscanf.c vsniprintf.c vsnprintf.c vsprintf.c vsscanf.c \ - stack_reg_va.S spu_clock_svcs.c spu_clock_stop.c spu_timer_flih.S \ - spu_timer_slih.c spu_timer_slih_reg.c spu_timer_svcs.c \ - spu_timer_stop.c spu_timer_free.c spu_timebase.c +lib_a_SOURCES = setjmp.S clearerr.c creat.c fclose.c feof.c ferror.c fflush.c \ + fgetc.c fgetpos.c fgets.c fileno.c fiprintf.S fiscanf.S fopen.c \ + fprintf.S fputc.c fputs.c fread.c freopen.c fscanf.S fseek.c \ + fsetpos.c ftell.c fwrite.c getc.c getchar.c gets.c iprintf.S \ + iscanf.S memcpy.c memmove.c memset.c perror.c printf.S \ + putc.c putchar.c puts.c remove.c rename.c rewind.c scanf.S \ + setbuf.c setvbuf.c siprintf.S siscanf.S sleep.c sniprintf.S \ + snprintf.S sprintf.S sscanf.S stdio.c strcat.c strchr.c strcmp.c \ + strcpy.c strcspn.c strlen.c strncat.c strncmp.c strncpy.c strpbrk.c \ + strrchr.c strspn.c strxfrm.c tmpfile.c tmpnam.c ungetc.c usleep.c \ + vfiprintf.c vfiscanf.c vfprintf.c vfscanf.c viprintf.c viscanf.c \ + vprintf.c vscanf.c vsiprintf.c vsiscanf.c vsniprintf.c vsnprintf.c \ + vsprintf.c vsscanf.c stack_reg_va.S lib_a_CCASFLAGS = $(AM_CCASFLAGS) lib_a_CFLAGS = $(AM_CFLAGS) -ACLOCAL_AMFLAGS = -I ../../.. -I ../../../.. +ACLOCAL_AMFLAGS = -I ../../.. -I ../../../.. CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host diff --git a/newlib/libc/machine/spu/Makefile.in b/newlib/libc/machine/spu/Makefile.in index 2eefed4b9..e6cc2384c 100644 --- a/newlib/libc/machine/spu/Makefile.in +++ b/newlib/libc/machine/spu/Makefile.in @@ -73,12 +73,7 @@ DIST_COMMON = $(srcdir)/../../../../config.guess \ $(srcdir)/../../../../compile $(srcdir)/../../../../compile \ $(srcdir)/../../../../compile $(srcdir)/../../../../compile \ $(srcdir)/../../../../compile $(srcdir)/../../../../compile \ - $(srcdir)/../../../../compile $(srcdir)/../../../../compile \ - $(srcdir)/../../../../compile $(srcdir)/../../../../compile \ - $(srcdir)/../../../../compile $(srcdir)/../../../../compile \ - $(srcdir)/../../../../compile $(srcdir)/../../../../compile \ - $(srcdir)/../../../../compile $(srcdir)/../../../../compile \ - $(srcdir)/../../../../compile $(srcdir)/../../../../compile + $(srcdir)/../../../../compile subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../../../acinclude.m4 \ @@ -93,54 +88,48 @@ LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru lib_a_AR = $(AR) $(ARFLAGS) lib_a_LIBADD = -am_lib_a_OBJECTS = lib_a-setjmp.$(OBJEXT) lib_a-assert.$(OBJEXT) \ - lib_a-clearerr.$(OBJEXT) lib_a-creat.$(OBJEXT) \ - lib_a-fclose.$(OBJEXT) lib_a-feof.$(OBJEXT) \ - lib_a-ferror.$(OBJEXT) lib_a-fflush.$(OBJEXT) \ - lib_a-fgetc.$(OBJEXT) lib_a-fgetpos.$(OBJEXT) \ - lib_a-fgets.$(OBJEXT) lib_a-fileno.$(OBJEXT) \ - lib_a-fiprintf.$(OBJEXT) lib_a-fiscanf.$(OBJEXT) \ - lib_a-fopen.$(OBJEXT) lib_a-fprintf.$(OBJEXT) \ - lib_a-fputc.$(OBJEXT) lib_a-fputs.$(OBJEXT) \ - lib_a-fread.$(OBJEXT) lib_a-freopen.$(OBJEXT) \ - lib_a-fscanf.$(OBJEXT) lib_a-fseek.$(OBJEXT) \ - lib_a-fsetpos.$(OBJEXT) lib_a-ftell.$(OBJEXT) \ - lib_a-fwrite.$(OBJEXT) lib_a-getc.$(OBJEXT) \ - lib_a-getchar.$(OBJEXT) lib_a-gets.$(OBJEXT) \ - lib_a-impure.$(OBJEXT) lib_a-iprintf.$(OBJEXT) \ - lib_a-iscanf.$(OBJEXT) lib_a-memcmp.$(OBJEXT) \ - lib_a-memcpy.$(OBJEXT) lib_a-memmove.$(OBJEXT) \ - lib_a-memset.$(OBJEXT) lib_a-perror.$(OBJEXT) \ - lib_a-printf.$(OBJEXT) lib_a-putc.$(OBJEXT) \ - lib_a-putchar.$(OBJEXT) lib_a-puts.$(OBJEXT) \ - lib_a-remove.$(OBJEXT) lib_a-rename.$(OBJEXT) \ - lib_a-rewind.$(OBJEXT) lib_a-scanf.$(OBJEXT) \ - lib_a-setbuf.$(OBJEXT) lib_a-setvbuf.$(OBJEXT) \ - lib_a-siprintf.$(OBJEXT) lib_a-siscanf.$(OBJEXT) \ - lib_a-sleep.$(OBJEXT) lib_a-sniprintf.$(OBJEXT) \ - lib_a-snprintf.$(OBJEXT) lib_a-sprintf.$(OBJEXT) \ - lib_a-sscanf.$(OBJEXT) lib_a-stdio.$(OBJEXT) \ - lib_a-strcat.$(OBJEXT) lib_a-strchr.$(OBJEXT) \ - lib_a-strcmp.$(OBJEXT) lib_a-strcpy.$(OBJEXT) \ - lib_a-strcspn.$(OBJEXT) lib_a-strlen.$(OBJEXT) \ - lib_a-strncat.$(OBJEXT) lib_a-strncmp.$(OBJEXT) \ - lib_a-strncpy.$(OBJEXT) lib_a-strpbrk.$(OBJEXT) \ - lib_a-strrchr.$(OBJEXT) lib_a-strspn.$(OBJEXT) \ - lib_a-strxfrm.$(OBJEXT) lib_a-tmpfile.$(OBJEXT) \ - lib_a-tmpnam.$(OBJEXT) lib_a-ungetc.$(OBJEXT) \ - lib_a-usleep.$(OBJEXT) lib_a-vfiprintf.$(OBJEXT) \ - lib_a-vfiscanf.$(OBJEXT) lib_a-vfprintf.$(OBJEXT) \ - lib_a-vfscanf.$(OBJEXT) lib_a-viprintf.$(OBJEXT) \ - lib_a-viscanf.$(OBJEXT) lib_a-vprintf.$(OBJEXT) \ - lib_a-vscanf.$(OBJEXT) lib_a-vsiprintf.$(OBJEXT) \ - lib_a-vsiscanf.$(OBJEXT) lib_a-vsniprintf.$(OBJEXT) \ - lib_a-vsnprintf.$(OBJEXT) lib_a-vsprintf.$(OBJEXT) \ - lib_a-vsscanf.$(OBJEXT) lib_a-stack_reg_va.$(OBJEXT) \ - lib_a-spu_clock_svcs.$(OBJEXT) lib_a-spu_clock_stop.$(OBJEXT) \ - lib_a-spu_timer_flih.$(OBJEXT) lib_a-spu_timer_slih.$(OBJEXT) \ - lib_a-spu_timer_slih_reg.$(OBJEXT) \ - lib_a-spu_timer_svcs.$(OBJEXT) lib_a-spu_timer_stop.$(OBJEXT) \ - lib_a-spu_timer_free.$(OBJEXT) lib_a-spu_timebase.$(OBJEXT) +am_lib_a_OBJECTS = lib_a-setjmp.$(OBJEXT) lib_a-clearerr.$(OBJEXT) \ + lib_a-creat.$(OBJEXT) lib_a-fclose.$(OBJEXT) \ + lib_a-feof.$(OBJEXT) lib_a-ferror.$(OBJEXT) \ + lib_a-fflush.$(OBJEXT) lib_a-fgetc.$(OBJEXT) \ + lib_a-fgetpos.$(OBJEXT) lib_a-fgets.$(OBJEXT) \ + lib_a-fileno.$(OBJEXT) lib_a-fiprintf.$(OBJEXT) \ + lib_a-fiscanf.$(OBJEXT) lib_a-fopen.$(OBJEXT) \ + lib_a-fprintf.$(OBJEXT) lib_a-fputc.$(OBJEXT) \ + lib_a-fputs.$(OBJEXT) lib_a-fread.$(OBJEXT) \ + lib_a-freopen.$(OBJEXT) lib_a-fscanf.$(OBJEXT) \ + lib_a-fseek.$(OBJEXT) lib_a-fsetpos.$(OBJEXT) \ + lib_a-ftell.$(OBJEXT) lib_a-fwrite.$(OBJEXT) \ + lib_a-getc.$(OBJEXT) lib_a-getchar.$(OBJEXT) \ + lib_a-gets.$(OBJEXT) lib_a-iprintf.$(OBJEXT) \ + lib_a-iscanf.$(OBJEXT) lib_a-memcpy.$(OBJEXT) \ + lib_a-memmove.$(OBJEXT) lib_a-memset.$(OBJEXT) \ + lib_a-perror.$(OBJEXT) lib_a-printf.$(OBJEXT) \ + lib_a-putc.$(OBJEXT) lib_a-putchar.$(OBJEXT) \ + lib_a-puts.$(OBJEXT) lib_a-remove.$(OBJEXT) \ + lib_a-rename.$(OBJEXT) lib_a-rewind.$(OBJEXT) \ + lib_a-scanf.$(OBJEXT) lib_a-setbuf.$(OBJEXT) \ + lib_a-setvbuf.$(OBJEXT) lib_a-siprintf.$(OBJEXT) \ + lib_a-siscanf.$(OBJEXT) lib_a-sleep.$(OBJEXT) \ + lib_a-sniprintf.$(OBJEXT) lib_a-snprintf.$(OBJEXT) \ + lib_a-sprintf.$(OBJEXT) lib_a-sscanf.$(OBJEXT) \ + lib_a-stdio.$(OBJEXT) lib_a-strcat.$(OBJEXT) \ + lib_a-strchr.$(OBJEXT) lib_a-strcmp.$(OBJEXT) \ + lib_a-strcpy.$(OBJEXT) lib_a-strcspn.$(OBJEXT) \ + lib_a-strlen.$(OBJEXT) lib_a-strncat.$(OBJEXT) \ + lib_a-strncmp.$(OBJEXT) lib_a-strncpy.$(OBJEXT) \ + lib_a-strpbrk.$(OBJEXT) lib_a-strrchr.$(OBJEXT) \ + lib_a-strspn.$(OBJEXT) lib_a-strxfrm.$(OBJEXT) \ + lib_a-tmpfile.$(OBJEXT) lib_a-tmpnam.$(OBJEXT) \ + lib_a-ungetc.$(OBJEXT) lib_a-usleep.$(OBJEXT) \ + lib_a-vfiprintf.$(OBJEXT) lib_a-vfiscanf.$(OBJEXT) \ + lib_a-vfprintf.$(OBJEXT) lib_a-vfscanf.$(OBJEXT) \ + lib_a-viprintf.$(OBJEXT) lib_a-viscanf.$(OBJEXT) \ + lib_a-vprintf.$(OBJEXT) lib_a-vscanf.$(OBJEXT) \ + lib_a-vsiprintf.$(OBJEXT) lib_a-vsiscanf.$(OBJEXT) \ + lib_a-vsniprintf.$(OBJEXT) lib_a-vsnprintf.$(OBJEXT) \ + lib_a-vsprintf.$(OBJEXT) lib_a-vsscanf.$(OBJEXT) \ + lib_a-stack_reg_va.$(OBJEXT) lib_a_OBJECTS = $(am_lib_a_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = @@ -267,26 +256,23 @@ AUTOMAKE_OPTIONS = cygnus INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) noinst_LIBRARIES = lib.a AM_CCASFLAGS = $(INCLUDES) -lib_a_SOURCES = setjmp.S assert.c clearerr.c creat.c fclose.c feof.c \ - ferror.c fflush.c fgetc.c fgetpos.c fgets.c fileno.c fiprintf.S \ - fiscanf.S fopen.c fprintf.S fputc.c fputs.c fread.c freopen.c \ - fscanf.S fseek.c fsetpos.c ftell.c fwrite.c getc.c getchar.c \ - gets.c impure.c iprintf.S iscanf.S memcmp.c memcpy.c memmove.c \ - memset.c perror.c printf.S putc.c putchar.c puts.c remove.c \ - rename.c rewind.c scanf.S setbuf.c setvbuf.c siprintf.S siscanf.S \ - sleep.c sniprintf.S snprintf.S sprintf.S sscanf.S stdio.c strcat.c \ - strchr.c strcmp.c strcpy.c strcspn.c strlen.c strncat.c strncmp.c \ - strncpy.c strpbrk.c strrchr.c strspn.c strxfrm.c tmpfile.c \ - tmpnam.c ungetc.c usleep.c vfiprintf.c vfiscanf.c vfprintf.c \ - vfscanf.c viprintf.c viscanf.c vprintf.c vscanf.c vsiprintf.c \ - vsiscanf.c vsniprintf.c vsnprintf.c vsprintf.c vsscanf.c \ - stack_reg_va.S spu_clock_svcs.c spu_clock_stop.c spu_timer_flih.S \ - spu_timer_slih.c spu_timer_slih_reg.c spu_timer_svcs.c \ - spu_timer_stop.c spu_timer_free.c spu_timebase.c +lib_a_SOURCES = setjmp.S clearerr.c creat.c fclose.c feof.c ferror.c fflush.c \ + fgetc.c fgetpos.c fgets.c fileno.c fiprintf.S fiscanf.S fopen.c \ + fprintf.S fputc.c fputs.c fread.c freopen.c fscanf.S fseek.c \ + fsetpos.c ftell.c fwrite.c getc.c getchar.c gets.c iprintf.S \ + iscanf.S memcpy.c memmove.c memset.c perror.c printf.S \ + putc.c putchar.c puts.c remove.c rename.c rewind.c scanf.S \ + setbuf.c setvbuf.c siprintf.S siscanf.S sleep.c sniprintf.S \ + snprintf.S sprintf.S sscanf.S stdio.c strcat.c strchr.c strcmp.c \ + strcpy.c strcspn.c strlen.c strncat.c strncmp.c strncpy.c strpbrk.c \ + strrchr.c strspn.c strxfrm.c tmpfile.c tmpnam.c ungetc.c usleep.c \ + vfiprintf.c vfiscanf.c vfprintf.c vfscanf.c viprintf.c viscanf.c \ + vprintf.c vscanf.c vsiprintf.c vsiscanf.c vsniprintf.c vsnprintf.c \ + vsprintf.c vsscanf.c stack_reg_va.S lib_a_CCASFLAGS = $(AM_CCASFLAGS) lib_a_CFLAGS = $(AM_CFLAGS) -ACLOCAL_AMFLAGS = -I ../../.. -I ../../../.. +ACLOCAL_AMFLAGS = -I ../../.. -I ../../../.. CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host all: all-am @@ -441,24 +427,12 @@ lib_a-stack_reg_va.o: stack_reg_va.S lib_a-stack_reg_va.obj: stack_reg_va.S $(CCAS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-stack_reg_va.obj `if test -f 'stack_reg_va.S'; then $(CYGPATH_W) 'stack_reg_va.S'; else $(CYGPATH_W) '$(srcdir)/stack_reg_va.S'; fi` -lib_a-spu_timer_flih.o: spu_timer_flih.S - $(CCAS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-spu_timer_flih.o `test -f 'spu_timer_flih.S' || echo '$(srcdir)/'`spu_timer_flih.S - -lib_a-spu_timer_flih.obj: spu_timer_flih.S - $(CCAS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-spu_timer_flih.obj `if test -f 'spu_timer_flih.S'; then $(CYGPATH_W) 'spu_timer_flih.S'; else $(CYGPATH_W) '$(srcdir)/spu_timer_flih.S'; fi` - .c.o: $(COMPILE) -c $< .c.obj: $(COMPILE) -c `$(CYGPATH_W) '$<'` -lib_a-assert.o: assert.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-assert.o `test -f 'assert.c' || echo '$(srcdir)/'`assert.c - -lib_a-assert.obj: assert.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-assert.obj `if test -f 'assert.c'; then $(CYGPATH_W) 'assert.c'; else $(CYGPATH_W) '$(srcdir)/assert.c'; fi` - lib_a-clearerr.o: clearerr.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-clearerr.o `test -f 'clearerr.c' || echo '$(srcdir)/'`clearerr.c @@ -591,18 +565,6 @@ lib_a-gets.o: gets.c lib_a-gets.obj: gets.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-gets.obj `if test -f 'gets.c'; then $(CYGPATH_W) 'gets.c'; else $(CYGPATH_W) '$(srcdir)/gets.c'; fi` -lib_a-impure.o: impure.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-impure.o `test -f 'impure.c' || echo '$(srcdir)/'`impure.c - -lib_a-impure.obj: impure.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-impure.obj `if test -f 'impure.c'; then $(CYGPATH_W) 'impure.c'; else $(CYGPATH_W) '$(srcdir)/impure.c'; fi` - -lib_a-memcmp.o: memcmp.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memcmp.o `test -f 'memcmp.c' || echo '$(srcdir)/'`memcmp.c - -lib_a-memcmp.obj: memcmp.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memcmp.obj `if test -f 'memcmp.c'; then $(CYGPATH_W) 'memcmp.c'; else $(CYGPATH_W) '$(srcdir)/memcmp.c'; fi` - lib_a-memcpy.o: memcpy.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memcpy.o `test -f 'memcpy.c' || echo '$(srcdir)/'`memcpy.c @@ -872,54 +834,6 @@ lib_a-vsscanf.o: vsscanf.c lib_a-vsscanf.obj: vsscanf.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsscanf.obj `if test -f 'vsscanf.c'; then $(CYGPATH_W) 'vsscanf.c'; else $(CYGPATH_W) '$(srcdir)/vsscanf.c'; fi` - -lib_a-spu_clock_svcs.o: spu_clock_svcs.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-spu_clock_svcs.o `test -f 'spu_clock_svcs.c' || echo '$(srcdir)/'`spu_clock_svcs.c - -lib_a-spu_clock_svcs.obj: spu_clock_svcs.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-spu_clock_svcs.obj `if test -f 'spu_clock_svcs.c'; then $(CYGPATH_W) 'spu_clock_svcs.c'; else $(CYGPATH_W) '$(srcdir)/spu_clock_svcs.c'; fi` - -lib_a-spu_clock_stop.o: spu_clock_stop.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-spu_clock_stop.o `test -f 'spu_clock_stop.c' || echo '$(srcdir)/'`spu_clock_stop.c - -lib_a-spu_clock_stop.obj: spu_clock_stop.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-spu_clock_stop.obj `if test -f 'spu_clock_stop.c'; then $(CYGPATH_W) 'spu_clock_stop.c'; else $(CYGPATH_W) '$(srcdir)/spu_clock_stop.c'; fi` - -lib_a-spu_timer_slih.o: spu_timer_slih.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-spu_timer_slih.o `test -f 'spu_timer_slih.c' || echo '$(srcdir)/'`spu_timer_slih.c - -lib_a-spu_timer_slih.obj: spu_timer_slih.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-spu_timer_slih.obj `if test -f 'spu_timer_slih.c'; then $(CYGPATH_W) 'spu_timer_slih.c'; else $(CYGPATH_W) '$(srcdir)/spu_timer_slih.c'; fi` - -lib_a-spu_timer_slih_reg.o: spu_timer_slih_reg.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-spu_timer_slih_reg.o `test -f 'spu_timer_slih_reg.c' || echo '$(srcdir)/'`spu_timer_slih_reg.c - -lib_a-spu_timer_slih_reg.obj: spu_timer_slih_reg.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-spu_timer_slih_reg.obj `if test -f 'spu_timer_slih_reg.c'; then $(CYGPATH_W) 'spu_timer_slih_reg.c'; else $(CYGPATH_W) '$(srcdir)/spu_timer_slih_reg.c'; fi` - -lib_a-spu_timer_svcs.o: spu_timer_svcs.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-spu_timer_svcs.o `test -f 'spu_timer_svcs.c' || echo '$(srcdir)/'`spu_timer_svcs.c - -lib_a-spu_timer_svcs.obj: spu_timer_svcs.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-spu_timer_svcs.obj `if test -f 'spu_timer_svcs.c'; then $(CYGPATH_W) 'spu_timer_svcs.c'; else $(CYGPATH_W) '$(srcdir)/spu_timer_svcs.c'; fi` - -lib_a-spu_timer_stop.o: spu_timer_stop.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-spu_timer_stop.o `test -f 'spu_timer_stop.c' || echo '$(srcdir)/'`spu_timer_stop.c - -lib_a-spu_timer_stop.obj: spu_timer_stop.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-spu_timer_stop.obj `if test -f 'spu_timer_stop.c'; then $(CYGPATH_W) 'spu_timer_stop.c'; else $(CYGPATH_W) '$(srcdir)/spu_timer_stop.c'; fi` - -lib_a-spu_timer_free.o: spu_timer_free.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-spu_timer_free.o `test -f 'spu_timer_free.c' || echo '$(srcdir)/'`spu_timer_free.c - -lib_a-spu_timer_free.obj: spu_timer_free.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-spu_timer_free.obj `if test -f 'spu_timer_free.c'; then $(CYGPATH_W) 'spu_timer_free.c'; else $(CYGPATH_W) '$(srcdir)/spu_timer_free.c'; fi` - -lib_a-spu_timebase.o: spu_timebase.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-spu_timebase.o `test -f 'spu_timebase.c' || echo '$(srcdir)/'`spu_timebase.c - -lib_a-spu_timebase.obj: spu_timebase.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-spu_timebase.obj `if test -f 'spu_timebase.c'; then $(CYGPATH_W) 'spu_timebase.c'; else $(CYGPATH_W) '$(srcdir)/spu_timebase.c'; fi` uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) diff --git a/newlib/libc/machine/spu/assert.c b/newlib/libc/machine/spu/assert.c deleted file mode 100644 index f1dd33047..000000000 --- a/newlib/libc/machine/spu/assert.c +++ /dev/null @@ -1,41 +0,0 @@ -#include -#include -#include - -/* - * SPU specific assert: just directly call exit(6), and use fprintf. That - * way we do not pull in the abort, signal.o code, nor (the likely - * otherwise unused) fiprintf. - */ - -/* func can be NULL, in which case no function information is given. */ -void -_DEFUN (__assert_func, (file, line, func, failedexpr), - const char *file _AND - int line _AND - const char *func _AND - const char *failedexpr) -{ - fprintf(stderr, - "assertion \"%s\" failed: file \"%s\", line %d%s%s\n", - failedexpr, file, line, - func ? ", function: " : "", func ? func : ""); - /* - * On the SPU, we do not have signaling. Previously, standard newlib - * abort code was used. That eventually leads to a kill(SIGABRT), and - * for SPU too an exit(SIGABRT). SIGABRT was 6, so just use that value - * here. - */ - exit(6); - /* NOTREACHED */ -} - -void -_DEFUN (__assert, (file, line, failedexpr), - const char *file _AND - int line _AND - const char *failedexpr) -{ - __assert_func (file, line, NULL, failedexpr); - /* NOTREACHED */ -} diff --git a/newlib/libc/machine/spu/fprintf.S b/newlib/libc/machine/spu/fprintf.S index c4a3efa77..ddd02550e 100644 --- a/newlib/libc/machine/spu/fprintf.S +++ b/newlib/libc/machine/spu/fprintf.S @@ -33,7 +33,6 @@ .text .align 4 GLOBL fprintf - .type fprintf, @function fprintf: stqd $0, 16($sp) /* save caller address */ il $2, 2 /* number of fixed arguments */ @@ -54,4 +53,3 @@ fprintf: a $sp, $sp, $2 lqd $0, 16($sp) /* load caller address */ bi $0 /* return to caller */ - .size fprintf, .-fprintf diff --git a/newlib/libc/machine/spu/fscanf.S b/newlib/libc/machine/spu/fscanf.S index e0d5f7fec..5b51e1dbe 100644 --- a/newlib/libc/machine/spu/fscanf.S +++ b/newlib/libc/machine/spu/fscanf.S @@ -33,7 +33,6 @@ .text .align 4 GLOBL fscanf - .type fscanf, @function fscanf: stqd $0, 16($sp) /* save caller address */ il $2, 2 /* number of fixed arguments */ @@ -54,4 +53,3 @@ fscanf: a $sp, $sp, $2 lqd $0, 16($sp) /* load caller address */ bi $0 /* return to caller */ - .size fscanf, .-fscanf diff --git a/newlib/libc/machine/spu/impure.c b/newlib/libc/machine/spu/impure.c deleted file mode 100644 index 5fbe0e5f5..000000000 --- a/newlib/libc/machine/spu/impure.c +++ /dev/null @@ -1,14 +0,0 @@ -#include - -/* Note that there is a copy of this in sys/reent.h. */ -#ifndef __ATTRIBUTE_IMPURE_PTR__ -#define __ATTRIBUTE_IMPURE_PTR__ -#endif - -#ifndef __ATTRIBUTE_IMPURE_DATA__ -#define __ATTRIBUTE_IMPURE_DATA__ -#endif - -struct _reent __ATTRIBUTE_IMPURE_DATA__ _impure_data = _REENT_INIT(_impure_data); -struct _reent *__ATTRIBUTE_IMPURE_PTR__ _impure_ptr = &_impure_data; -struct _reent *_CONST __ATTRIBUTE_IMPURE_PTR__ _global_impure_ptr = &_impure_data; diff --git a/newlib/libc/machine/spu/include/spu_timer.h b/newlib/libc/machine/spu/include/spu_timer.h deleted file mode 100644 index 4116aac9f..000000000 --- a/newlib/libc/machine/spu/include/spu_timer.h +++ /dev/null @@ -1,85 +0,0 @@ -/* -(C) Copyright IBM Corp. 2008 - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -* Redistributions in binary form must 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 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. -*/ - -#ifndef _SPU_TIMER_H_ -#define _SPU_TIMER_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -/* Clock services. */ -extern void spu_clock_start (void); -extern int spu_clock_stop (void); -extern uint64_t spu_clock_read (void); - -/* Timer services. */ -extern int spu_timer_alloc (int interval, void (*func) (int)); -extern int spu_timer_free (int id); -extern int spu_timer_start (int id); -extern int spu_timer_stop (int id); -extern unsigned spu_timebase (void); - -/* Interrupt services. */ -extern void spu_slih_register (unsigned event_mask, - unsigned (*slih) (unsigned)); -extern unsigned spu_clock_slih (unsigned event_mask); - -/* Number of supported timers. */ -#define SPU_TIMER_NTIMERS 4 - -/* Recommended minimun spu timer interval time from (cat /proc/cpuinfo) - * QS20 100/14318000 = 6.98 usec - * QS21/QS22 100/26666666 = 3.75 usec - * PS3 100/79800000 = 1.25 usec */ -#define SPU_TIMER_MIN_INTERVAL 100 - -/* Clock error codes. */ -#define SPU_CLOCK_ERR_NOT_RUNNING -2 -#define SPU_CLOCK_ERR_STILL_RUNNING -3 -#define SPU_CLOCK_ERR_TIMERS_ACTIVE -4 - -/* Timer error codes. */ -#define SPU_TIMER_ERR_INVALID_PARM -10 -#define SPU_TIMER_ERR_NONE_FREE -11 -#define SPU_TIMER_ERR_INVALID_ID -12 -#define SPU_TIMER_ERR_ACTIVE -13 -#define SPU_TIMER_ERR_NOT_ACTIVE -14 -#define SPU_TIMER_ERR_NOCLOCK -15 -#define SPU_TIMER_ERR_FREE -16 -#define SPU_TIMER_ERR_NOT_STOPPED -17 - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/newlib/libc/machine/spu/memcmp.c b/newlib/libc/machine/spu/memcmp.c deleted file mode 100644 index a0f5449d9..000000000 --- a/newlib/libc/machine/spu/memcmp.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - (C) Copyright 2008 - 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 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 -#include "strncmp.h" - -/* - * Compare the two strings s1 and s2 of length n. Returns an integer less - * than, equal to, or greater than zero if s1 is found, respectively, - * to be less than, to match, or be greater than s2. - */ -int memcmp(const void *s1, const void *s2, size_t n) -{ - vec_uint4 end_v; - return _strncmp_internal (s1, s2, n, &end_v, 0 /* no zero check */); -} diff --git a/newlib/libc/machine/spu/mk_syscalls b/newlib/libc/machine/spu/mk_syscalls index 8ed87e5fa..db9ea9409 100644 --- a/newlib/libc/machine/spu/mk_syscalls +++ b/newlib/libc/machine/spu/mk_syscalls @@ -69,7 +69,6 @@ while ($line = ) { print SOURCE " .text\n"; print SOURCE " .align 4\n"; print SOURCE " GLOBL ", $name, "\n"; - print SOURCE " .type ", $name, ", \@function\n"; print SOURCE $name, ":\n"; print SOURCE " stqd \$0, 16(\$sp) \/\* save caller address \*\/\n"; @@ -94,8 +93,6 @@ while ($line = ) { print SOURCE " lqd \$0, 16(\$sp) \/\* load caller address \*\/\n"; print SOURCE " bi \$0 \/\* return to caller \*\/\n"; - print SOURCE " .size ", $name, ", .-", $name, "\n"; - close(SOURCE); } diff --git a/newlib/libc/machine/spu/printf.S b/newlib/libc/machine/spu/printf.S index d4485c93a..36feaf7aa 100644 --- a/newlib/libc/machine/spu/printf.S +++ b/newlib/libc/machine/spu/printf.S @@ -33,7 +33,6 @@ .text .align 4 GLOBL printf - .type printf, @function printf: stqd $0, 16($sp) /* save caller address */ il $2, 1 /* number of fixed arguments */ @@ -48,4 +47,3 @@ printf: a $sp, $sp, $2 lqd $0, 16($sp) /* load caller address */ bi $0 /* return to caller */ - .size printf, .-printf diff --git a/newlib/libc/machine/spu/scanf.S b/newlib/libc/machine/spu/scanf.S index 040065868..f547d8ecf 100644 --- a/newlib/libc/machine/spu/scanf.S +++ b/newlib/libc/machine/spu/scanf.S @@ -33,7 +33,6 @@ .text .align 4 GLOBL scanf - .type scanf, @function scanf: stqd $0, 16($sp) /* save caller address */ il $2, 1 /* number of fixed arguments */ @@ -48,4 +47,3 @@ scanf: a $sp, $sp, $2 lqd $0, 16($sp) /* load caller address */ bi $0 /* return to caller */ - .size scanf, .-scanf diff --git a/newlib/libc/machine/spu/setjmp.S b/newlib/libc/machine/spu/setjmp.S index 891806bb0..dfa1bd0c4 100644 --- a/newlib/libc/machine/spu/setjmp.S +++ b/newlib/libc/machine/spu/setjmp.S @@ -36,7 +36,6 @@ Author: Andreas Neukoetter (ti95neuk@de.ibm.com) .text .align 2 .global setjmp - .type setjmp, @function setjmp: stqd $80, 2*16($3) stqd $81, 3*16($3) @@ -98,7 +97,6 @@ setjmp: setjmp_ret: bi $0 - .size setjmp, .-setjmp /* int longjmp( jmp_buf env, int val ); @@ -106,7 +104,6 @@ setjmp_ret: .text .align 2 .global longjmp - .type longjmp, @function longjmp: lr $127, $1 @@ -179,5 +176,4 @@ longjmp: longjmp_ret: bi $0 - .size longjmp, .-longjmp diff --git a/newlib/libc/machine/spu/snprintf.S b/newlib/libc/machine/spu/snprintf.S index 17d03e376..90bd98a03 100644 --- a/newlib/libc/machine/spu/snprintf.S +++ b/newlib/libc/machine/spu/snprintf.S @@ -33,7 +33,6 @@ .text .align 4 GLOBL snprintf - .type snprintf, @function snprintf: stqd $0, 16($sp) /* save caller address */ il $2, 3 /* number of fixed arguments */ @@ -48,4 +47,3 @@ snprintf: a $sp, $sp, $2 lqd $0, 16($sp) /* load caller address */ bi $0 /* return to caller */ - .size snprintf, .-snprintf diff --git a/newlib/libc/machine/spu/sprintf.S b/newlib/libc/machine/spu/sprintf.S index 9464aed19..56fca77ea 100644 --- a/newlib/libc/machine/spu/sprintf.S +++ b/newlib/libc/machine/spu/sprintf.S @@ -33,7 +33,6 @@ .text .align 4 GLOBL sprintf - .type sprintf, @function sprintf: stqd $0, 16($sp) /* save caller address */ il $2, 2 /* number of fixed arguments */ @@ -48,4 +47,3 @@ sprintf: a $sp, $sp, $2 lqd $0, 16($sp) /* load caller address */ bi $0 /* return to caller */ - .size sprintf, .-sprintf diff --git a/newlib/libc/machine/spu/spu_clock_stop.c b/newlib/libc/machine/spu/spu_clock_stop.c deleted file mode 100644 index da31b42c6..000000000 --- a/newlib/libc/machine/spu/spu_clock_stop.c +++ /dev/null @@ -1,67 +0,0 @@ -/* -(C) Copyright IBM Corp. 2008 - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -* Redistributions in binary form must 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 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. -*/ - -/* SPU clock stop library service. */ -#include -#include "spu_timer_internal.h" - -/* Stops the SPU clock: - * decrements clock start count - * when count is zero, disables the decrementer event and stops the - decrementer - Returns 0 on success and <0 on failure: - * SPU_CLOCK_ERR_NOT_RUNNING - clock was already off - * SPU_CLOCK_ERR_TIMERS_ACTIVE - active timers exist - * SPU_CLOCK_ERR_STILL_RUNNING - start count was decremented but clock was - not stopped */ -int -spu_clock_stop (void) -{ - if (__spu_clock_startcnt == 0) - return SPU_CLOCK_ERR_NOT_RUNNING; - - if (__spu_clock_startcnt == 1 && (__spu_timers_active || __spu_timers_handled)) - return SPU_CLOCK_ERR_TIMERS_ACTIVE; - - /* Don't stop clock if the clock is still in use. */ - if (--__spu_clock_startcnt != 0) - return SPU_CLOCK_ERR_STILL_RUNNING; - - /* Clock stopped, stop decrementer. */ - __disable_spu_decr (); - - /* Clock is enabled on clock start - restore to original state (saved at start). */ - if (__likely (!__spu_clock_state_was_enabled)) - { - spu_idisable (); - } - - return 0; -} diff --git a/newlib/libc/machine/spu/spu_clock_svcs.c b/newlib/libc/machine/spu/spu_clock_svcs.c deleted file mode 100644 index 6cc2af4a9..000000000 --- a/newlib/libc/machine/spu/spu_clock_svcs.c +++ /dev/null @@ -1,93 +0,0 @@ -/* -(C) Copyright IBM Corp. 2008 - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -* Redistributions in binary form must 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 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. -*/ - -/* SPU clock start and read library services. */ -#include -#include "spu_timer_internal.h" - -/* The software managed timebase value. */ -volatile uint64_t __spu_tb_val __attribute__ ((aligned (16))); - -/* Timeout value of the current interval. */ -volatile int __spu_tb_timeout __attribute__ ((aligned (16))); - -/* Clock start count (clock is running if >0). */ -volatile unsigned __spu_clock_startcnt __attribute__ ((aligned (16))); - -/* Saved interrupt state from clock_start. */ -volatile unsigned __spu_clock_state_was_enabled; - -/* Initializes the software managed timebase, enables the decrementer event, - starts the decrementer and enables interrupts. Must be called before - clock or timer services can be used. Should only be called by base app/lib - code (not from an interrupt/timer handler). - Returns with interrupts ENABLED. */ -void -spu_clock_start (void) -{ - /* Increment clock start and return if it was already running. */ - if (++__spu_clock_startcnt > 1) - return; - - __spu_clock_state_was_enabled = spu_readch (SPU_RdMachStat) & 0x1; - - spu_idisable (); - __spu_tb_timeout = CLOCK_START_VALUE; - __spu_tb_val = 0; - - /* Disable, write, enable the decrementer. */ - __enable_spu_decr (__spu_tb_timeout, __disable_spu_decr ()); - - spu_ienable (); - - return; -} - -/* Returns a monotonically increasing, 64-bit counter, in timebase units, - relative to the last call to spu_clock_start(). */ -uint64_t -spu_clock_read (void) -{ - int64_t time; - unsigned was_enabled; - - /* Return 0 if clock is off. */ - if (__spu_clock_startcnt == 0) - return 0LL; - - was_enabled = spu_readch (SPU_RdMachStat) & 0x1; - spu_idisable (); - - time = __spu_tb_val + (__spu_tb_timeout - spu_readch (SPU_RdDec)); - - if (__likely (was_enabled)) - spu_ienable (); - return time; -} diff --git a/newlib/libc/machine/spu/spu_timebase.c b/newlib/libc/machine/spu/spu_timebase.c deleted file mode 100644 index cb8f34d94..000000000 --- a/newlib/libc/machine/spu/spu_timebase.c +++ /dev/null @@ -1,51 +0,0 @@ -/* -(C) Copyright IBM Corp. 2008 - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -* Redistributions in binary form must 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 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. -*/ - -#include -#include - -/* This function queries /proc/cpuinfo and returns the SPU time base in - Hertz. */ -unsigned int -spu_timebase (void) -{ - FILE *f; - unsigned tb = 0; - char line[64]; - if ((f = fopen ("/proc/cpuinfo", "r"))) - { - while (fgets (line, sizeof (line), f)) - if (sscanf (line, "timebase : %u", &tb)) - break; - fclose (f); - } - return (tb); -} - diff --git a/newlib/libc/machine/spu/spu_timer_flih.S b/newlib/libc/machine/spu/spu_timer_flih.S deleted file mode 100644 index 63f5f074c..000000000 --- a/newlib/libc/machine/spu/spu_timer_flih.S +++ /dev/null @@ -1,152 +0,0 @@ -/* -(C) Copyright IBM Corp. 2008 - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -* Redistributions in binary form must 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 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. -*/ - -/* First-level interrupt handler. */ - -/* The following two convenience macros assist in the coding of the - saving and restoring the volatile register starting from register - 2 up to register 79. - - saveregs first, last Saves registers from first to the last. - restoreregs first, last Restores registers from last down to first. - - Note: first must be less than or equal to last. */ - -.macro saveregs first, last - stqd $\first, -(STACK_SKIP+\first)*16($SP) -.if \last-\first - saveregs "(\first+1)",\last -.endif -.endm - - -.macro restoreregs first, last - lqd $\last, (82-\last)*16($SP) -.if \last-\first - restoreregs \first,"(\last-1)" -.endif -.endm - - .section .interrupt,"ax" - .align 3 - .type spu_flih, @function -spu_flih: - /* Adjust the stack pointer to skip the maximum register save area - (STACK_SKIP quadword registers) in case an interrupt occurred while - executing a leaf function that used the stack area without actually - allocating its own stack frame. */ - .set STACK_SKIP, 125 - - /* Save the current link register on a new stack frame for the - normal spu_flih() version of this file. */ - stqd $0, -(STACK_SKIP+80)*16($SP) - stqd $SP, -(STACK_SKIP+82)*16($SP) /* Save back chain pointer. */ - - saveregs 2, 39 - - il $2, -(STACK_SKIP+82)*16 /* Stack frame size. */ - rdch $3, $SPU_RdEventStat /* Read event status. */ - - rdch $6, $SPU_RdEventMask /* Read event mask. */ - hbrp /* Open a slot for instruction prefetch. */ - - saveregs 40,59 - - clz $4, $3 /* Get first slih index. */ - stqd $6, -(STACK_SKIP+1)*16($SP) /* Save event mask on stack. */ - - saveregs 60, 67 - - /* Do not disable/ack the decrementer event here. - The timer library manages this and expects it - to be enabled upon entry to the SLIH. */ - il $7, 0x20 - andc $5, $3, $7 - andc $7, $6, $5 /* Clear event bits. */ - saveregs 68, 69 - - wrch $SPU_WrEventAck, $3 /* Ack events(s) - include decrementer event. */ - wrch $SPU_WrEventMask, $7 /* Disable event(s) - exclude decrementer event. */ - - saveregs 70, 79 - - a $SP, $SP, $2 /* Instantiate flih stack frame. */ -next_event: - /* Fetch and dispatch the event handler for the first non-zero event. The - dispatch handler is indexed into the __spu_slih_handlers array using the - count of zero off the event status as an index. */ - ila $5, __spu_slih_handlers /* Slih array offset. */ - - shli $4, $4, 2 /* Slih entry offset. */ - lqx $5, $4, $5 /* Load slih address. */ - rotqby $5, $5, $4 /* Rotate to word 0. */ - bisl $0, $5 /* Branch to slih. */ - - clz $4, $3 /* Get next slih index. */ - brnz $3, next_event - - - lqd $2, 81*16($SP) /* Read event mask from stack. */ - - restoreregs 40, 79 - - wrch $SPU_WrEventMask, $2 /* Restore event mask. */ - hbrp /* Open a slot for instruction pre-fetch. */ - - restoreregs 2, 39 - - /* Restore the link register from the new stack frame for the - normal spu_flih() version of this file. */ - lqd $0, 2*16($SP) - - lqd $SP, 0*16($SP) /* restore stack pointer from back chain ptr. */ - - irete /* Return from interrupt and re-enable interrupts. */ - .size spu_flih, .-spu_flih -/* spu_slih_handlers[] - Here we initialize 33 default event handlers. The first entry in this array - corresponds to the event handler for the event associated with bit 0 of - Channel 0 (External Event Status). The 32nd entry in this array corresponds - to bit 31 of Channel 0 (DMA Tag Status Update Event). The 33rd entry in - this array is a special case entry to handle "phantom events" which occur - when the channel count for Channel 0 is 1, causing an asynchronous SPU - interrupt, but the value returned for a read of Channel 0 is 0. The index - calculated into this array by spu_flih() for this case is 32, hence the - 33rd entry. */ -.data - .align 4 - .extern __spu_default_slih - .global __spu_slih_handlers - .type __spu_slih_handlers, @object -__spu_slih_handlers: - .rept 33 - .long __spu_default_slih - .endr - .size __spu_slih_handlers, .-__spu_slih_handlers diff --git a/newlib/libc/machine/spu/spu_timer_free.c b/newlib/libc/machine/spu/spu_timer_free.c deleted file mode 100644 index 9fb3e0cda..000000000 --- a/newlib/libc/machine/spu/spu_timer_free.c +++ /dev/null @@ -1,86 +0,0 @@ -/* -(C) Copyright IBM Corp. 2008 - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -* Redistributions in binary form must 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 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. -*/ - -/* SPU timer free library service. */ -#include -#include "spu_timer_internal.h" - - -/* Frees an allocated timer. The timer must be in the stopped state for this - to succeed. Maybe be called: - * after allocated, before it's started - * after it's been explicitly stopped - Returns 0 on success, timer sucessfully deallocated. Returns <0 on failure - * SPU_TIMER_INVALID_ID - id out of range - * SPU_TIMER_ERR_FREE - id in free state - * SPU_TIMER_ERR_ACTIVE - id in handled or active state */ -int -spu_timer_free (int id) -{ - spu_timer_t *t, **pn; - unsigned was_enabled; - - if (id < 0 || id >= SPU_TIMER_NTIMERS) - return SPU_TIMER_ERR_INVALID_ID; - - if (__spu_timers[id].state == SPU_TIMER_STOPPED) - { - - was_enabled = spu_readch (SPU_RdMachStat) & 0x1; - spu_idisable (); - - t = __spu_timers_stopped; - pn = &__spu_timers_stopped; - - while (t && (t->id != id)) - { - pn = &t->next; - t = t->next; - } -#ifdef SPU_TIMER_DEBUG - if (!t) - ABORT (); -#endif - *pn = t->next; - - /* Add timer back to free list (mask). */ - __spu_timers_avail |= (1 << (id)); - __spu_timers[id].state = SPU_TIMER_FREE; - - if (__likely (was_enabled)) - spu_ienable (); - - return 0; - } - - /* Handle invalid states. */ - return (__spu_timers[id].state == SPU_TIMER_FREE) ? - SPU_TIMER_ERR_FREE : SPU_TIMER_ERR_ACTIVE; -} diff --git a/newlib/libc/machine/spu/spu_timer_internal.h b/newlib/libc/machine/spu/spu_timer_internal.h deleted file mode 100644 index a438561b9..000000000 --- a/newlib/libc/machine/spu/spu_timer_internal.h +++ /dev/null @@ -1,140 +0,0 @@ -/* -(C) Copyright IBM Corp. 2008 - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -* Redistributions in binary form must 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 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. -*/ - -/* Internal definitions for SPU timer library. */ -#ifndef _SPU_TIMER_INTERNAL_H_ -#define _SPU_TIMER_INTERNAL_H_ - -#include -#include -#include -#include - -#ifdef SPU_TIMER_DEBUG -#include -#include -#endif - -/* The timer state tells which list its on. */ -typedef enum spu_timer_state -{ - SPU_TIMER_FREE = 0, - SPU_TIMER_ACTIVE = 1, - SPU_TIMER_HANDLED = 2, - SPU_TIMER_STOPPED = 3 -} spu_timer_state_t; - -typedef struct spu_timer -{ - int tmout __attribute__ ((aligned (16))); /* Time until expiration (tb). */ - int intvl __attribute__ ((aligned (16))); /* Interval. */ - int id __attribute__ ((aligned (16))); - spu_timer_state_t state __attribute__ ((aligned (16))); - void (*func) (int) __attribute__ ((aligned (16))); /* Handler. */ - struct spu_timer *next __attribute__ ((aligned (16))); -} spu_timer_t; - - -/* Max decrementer value. */ -#define DECR_MAX 0xFFFFFFFFU - - /* Arbitrary non-triggering value. */ -#define CLOCK_START_VALUE 0x7FFFFFFF - -#define MIN_INTVL 1 -#define MAX_INTVL INT_MAX - -/* Timers within 15 tics will expire together. */ -#define TIMER_INTERVAL_WINDOW 15 - -/* Disables the decrementer and returns the saved event mask for a subsequent - call to __enable_spu_decr. The decrementer interrupt is acknowledged in the - flih when the event is received, but is required also as part of the - procedure to stop the decrementer. */ -static inline unsigned -__disable_spu_decr (void) -{ - unsigned mask = spu_readch (SPU_RdEventMask); - spu_writech (SPU_WrEventMask, mask & ~MFC_DECREMENTER_EVENT); - spu_writech (SPU_WrEventAck, MFC_DECREMENTER_EVENT); - spu_sync_c (); - return mask; -} - -/* Writes and enables the decrementer, along with the given event mask. */ -static inline void -__enable_spu_decr (int val, unsigned mask) -{ - spu_writech (SPU_WrDec, (val)); - spu_writech (SPU_WrEventMask, mask | MFC_DECREMENTER_EVENT); - spu_sync_c (); -} - -/* These are shared between modules but are not inlined, to save space. */ -extern void __spu_timer_start (int id, int reset); -extern void __reset_spu_decr (int val); - -/* The timers. */ -extern spu_timer_t __spu_timers[]; - -/* Active timer list. */ -extern spu_timer_t *__spu_timers_active; - -/* Stopped (allocated) timer list. */ -extern spu_timer_t *__spu_timers_stopped; - -/* List of timers being handled. */ -extern spu_timer_t *__spu_timers_handled; - -/* Bitmask of available timers. */ -extern unsigned __spu_timers_avail; - -/* The software managed timebase value. */ -extern volatile uint64_t __spu_tb_val; - -/* Timeout value of the current interval. */ -extern volatile int __spu_tb_timeout; - -/* Clock start count (clock is running if >0). */ -extern volatile unsigned __spu_clock_startcnt; - -/* Saved interrupt state from clock_start. */ -extern volatile unsigned __spu_clock_state_was_enabled; - -#define __likely(_c) __builtin_expect((_c), 1) -#define __unlikely(_c) __builtin_expect((_c), 0) - -#define ABORT() \ -{\ - fprintf(stderr, "Internal error, aborting: %s:%d\n", __FILE__, __LINE__);\ - assert(0);\ -} - -#endif diff --git a/newlib/libc/machine/spu/spu_timer_slih.c b/newlib/libc/machine/spu/spu_timer_slih.c deleted file mode 100644 index 93cfa5ea2..000000000 --- a/newlib/libc/machine/spu/spu_timer_slih.c +++ /dev/null @@ -1,221 +0,0 @@ -/* -(C) Copyright IBM Corp. 2008 - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -* Redistributions in binary form must 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 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. -*/ - -/* Second Level Interrupt handler and related services for SPU timers. */ -#include "spu_timer_internal.h" -/* Resets decrementer to the specified value. Also updates software timebase - to account for the time between the last decrementer reset and now. There - are two cases: - * Called by application to start a new timer. - * Called by spu_clock to active the next timer. - In both cases, the amount of time is the current interval timeout minus the - current decrementer value. */ -void -__reset_spu_decr (int val) -{ - - /* The interrupt occurs when the msb goes from 0 to 1 or when the decrementer - goes from 0 to -1. To be precisely accurate we should set the timer to - the intverval -1, unless the interval passed in is 0 in which case it - should be left at 0. */ - int enable_val = (__likely (val)) ? val - 1 : 0; - - /* Decrementer must be stopped before writing it - minimize the time - stopped. */ - unsigned mask = __disable_spu_decr (); - - /* Perform tb correction before resettting the decrementer. the corrected - value is the current timeout value minus the current decrementer value. - Occasionally the read returns 0 - a second read will clear this - condition. */ - int decval0 = spu_readch (SPU_RdDec); - int decval = spu_readch (SPU_RdDec); - /* Restart decrementer with next timeout val. */ - __enable_spu_decr (enable_val, mask); - - /* Update the timebase values before enabling for interrupts. */ - __spu_tb_val += __spu_tb_timeout - decval; - __spu_tb_timeout = enable_val; -} - -/* Update software timebase and timeout value for the 'next to expire' timer. - Called when starting a new timer so the timer list will have timeouts - relative to the current time. */ -static inline void -__update_spu_tb_val (void) -{ - int elapsed = __spu_tb_timeout - spu_readch (SPU_RdDec); -#ifdef SPU_TIMER_DEBUG - if (elapsed < 0) - ABORT (); -#endif - __spu_tb_val += elapsed; - - /* Adjust the timeout for the timer next to expire. Note this could cause - the timeout to go negative, if it was just about to expire when we called - spu_timer_start. This is OK, since this can happen any time interrupts - are disabled. We just schedule an immediate timeout in this case. */ - if (__spu_timers_active) - { - __spu_timers_active->tmout -= elapsed; - if (__spu_timers_active->tmout < 0) - __spu_timers_active->tmout = 0; - } -} - -/* Add an allocated timer to the active list. The active list is sorted by - timeout value. The timer at the head of the list is the timer that will - expire next. The rest of the timers have a timeout value that is relative - to the timer ahead of it on the list. This relative value is determined - here, when the timer is added to the active list. When its position in the - list is found, the timer's timeout value is set to its interval minus the - sum of all the timeout values ahead of it. The timeout value for the timer - following the newly added timer is then adjusted to a new relative value. If - the newly added timer is at the head of the list, the decrementer is reset. - This function is called by SLIH to restart multiple timers (reset == 0) or - by spu_timer_start() to start a single timer (reset == 1). */ -void -__spu_timer_start (int id, int reset) -{ - spu_timer_t *t; - spu_timer_t **pn; - spu_timer_t *start = &__spu_timers[id]; - unsigned tmout_time = 0; - unsigned my_intvl = start->intvl; - unsigned was_enabled = spu_readch (SPU_RdMachStat) & 0x1; - - spu_idisable (); - - t = __spu_timers_active; - pn = &__spu_timers_active; - - /* If the active list is empty, just add the timer with the timeout set to - the interval. Otherwise find the place in the list for the timer, setting - its timeout to its interval minus the sum of timeouts ahead of it. */ - start->state = SPU_TIMER_ACTIVE; - if (__likely (!t)) - { - __spu_timers_active = start; - start->next = NULL; - start->tmout = my_intvl; - } - else - { - - /* Update swtb and timeout val of the next timer, so all times are - relative to now. */ - if (reset) - __update_spu_tb_val (); - - while (t && (my_intvl >= (tmout_time + t->tmout))) - { - tmout_time += t->tmout; - pn = &t->next;; - t = t->next; - } - start->next = t; - start->tmout = my_intvl - tmout_time; - *pn = start; - - /* Adjust timeout for timer after us. */ - if (t) - t->tmout -= start->tmout; - } - - if (reset && (__spu_timers_active == start)) - __reset_spu_decr (__spu_timers_active->tmout); - - if (__unlikely (was_enabled)) - spu_ienable (); -} - -/* SLIH for decrementer. Manages software timebase and timers. - Called by SPU FLIH. Assumes decrementer is still running - (event not yet acknowledeged). */ -unsigned int -spu_clock_slih (unsigned status) -{ - int decr_reset_val; - spu_timer_t *active, *handled; - unsigned was_enabled = spu_readch (SPU_RdMachStat) & 0x1; - - status &= ~MFC_DECREMENTER_EVENT; - - spu_idisable (); - - /* The decrementer has now expired. The decrementer event was acknowledged - in the FLIH but not disabled. The decrementer will continue to run while - we're running the clock/timer handler. The software clock keeps running, - and accounts for all the time spent running handlers. Add the current - timeout to the software timebase and set the timeout to DECR_MAX. This - allows the "clock read" code to continue to work while we're in here, and - gives us the most possible time to finish before another underflow. */ - __spu_tb_val += __spu_tb_timeout; - __spu_tb_timeout = DECR_MAX; - - /* For all timers that have the current timeout value, move them from the - active list to the handled list and call their handlers. Note that the - handled/stopped lists may be manipulated by the handlers if they wish to - stop/free the timers. Note that only the first expired timer will reflect - the real timeout value; the rest of the timers that had the same timeout - value will have a relative value of zero. */ - if (__spu_timers_active) - { - __spu_timers_active->tmout = 0; - while ((active = __spu_timers_active) - && (active->tmout <= TIMER_INTERVAL_WINDOW)) - { - __spu_timers_active = active->next; - active->next = __spu_timers_handled; - __spu_timers_handled = active; - active->state = SPU_TIMER_HANDLED; - (*active->func) (active->id); - } - } - - /* put the handled timers back on the list and restart decrementer. */ - while ((handled = __spu_timers_handled) != NULL) - { - __spu_timers_handled = handled->next; - __spu_timer_start (handled->id, 0); - } - - /* Reset the decrementer before returning. If we have any active timers, we - set it to the timeout value for the timer at the head of the list, else - the default clock value. */ - decr_reset_val = __spu_timers_active ? __spu_timers_active->tmout : CLOCK_START_VALUE; - - __reset_spu_decr (decr_reset_val); - - if (__likely (was_enabled)) - spu_ienable (); - - return status; -} diff --git a/newlib/libc/machine/spu/spu_timer_slih_reg.c b/newlib/libc/machine/spu/spu_timer_slih_reg.c deleted file mode 100644 index cd1e86fbb..000000000 --- a/newlib/libc/machine/spu/spu_timer_slih_reg.c +++ /dev/null @@ -1,72 +0,0 @@ -/* -(C) Copyright IBM Corp. 2008 - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -* Redistributions in binary form must 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 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. -*/ - - -/* Services for SLIH registration. */ -#include -#include - -#define SPU_EVENT_ID(_mask) \ - (spu_extract(spu_cntlz(spu_promote(_mask, 0)), 0)) -typedef unsigned (*spu_slih_t) (unsigned); - -extern spu_slih_t __spu_slih_handlers[]; - -/* This function is called whenever an event occurs for which no second level - event handler was registered. The default event handler does nothing and - zeros the most significant event bit indicating that the event was processed - (when in reality, it was discarded). */ -unsigned -__spu_default_slih (unsigned events) -{ - unsigned int mse; - - mse = 0x80000000 >> SPU_EVENT_ID (events); - events &= ~mse; - - return (events); -} - -/* Registers a SPU second level interrupt handler for the events specified by - mask. The event mask consists of a set of bits corresponding to the event - status bits (see channel 0 description). A mask containing multiple 1 bits - will set the second level event handler for each of the events. */ -void -spu_slih_register (unsigned mask, spu_slih_t func) -{ - unsigned int id; - - while (mask) - { - id = SPU_EVENT_ID (mask); - __spu_slih_handlers[id] = (func) ? func : __spu_default_slih; - mask &= ~(0x80000000 >> id); - } -} diff --git a/newlib/libc/machine/spu/spu_timer_stop.c b/newlib/libc/machine/spu/spu_timer_stop.c deleted file mode 100644 index 94286c914..000000000 --- a/newlib/libc/machine/spu/spu_timer_stop.c +++ /dev/null @@ -1,101 +0,0 @@ -/* -(C) Copyright IBM Corp. 2008 - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -* Redistributions in binary form must 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 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. -*/ - -/* SPU timer stop library service. */ -#include -#include "spu_timer_internal.h" - -/* Stop a timer. Moves it from either the active or handled list to the - stopped list. Returns 0 on sucess, timer was successfully stopped. - Returns <0 - Failure: - * SPU_TIMER_ERR_NOT_ACTIVE - timer was not active - * SPU_TIMER_ERR_INVALID_ID - invalid timer id - * SPU_TIMER_ERR_NOCLOCK - spu clock is not running */ -int -spu_timer_stop (int id) -{ - spu_timer_t *t, **pn; - unsigned was_enabled; - - if (id < 0 || id >= SPU_TIMER_NTIMERS) - return SPU_TIMER_ERR_INVALID_ID; - - if (__spu_clock_startcnt == 0) - return SPU_TIMER_ERR_NOCLOCK; - - - /* Free or stopped states. */ - if (__spu_timers[id].state == SPU_TIMER_ACTIVE || - __spu_timers[id].state == SPU_TIMER_HANDLED) - { - was_enabled = spu_readch (SPU_RdMachStat) & 0x1; - spu_idisable (); - - /* Timer is on either active list or handled list. */ - t = (__spu_timers[id].state == SPU_TIMER_ACTIVE) - ? __spu_timers_active : __spu_timers_handled; - - pn = (__spu_timers[id].state == SPU_TIMER_ACTIVE) - ? &__spu_timers_active : &__spu_timers_handled; - - while (t && t->id != id) - { - pn = &t->next; - t = t->next; - } -#ifdef SPU_TIMER_DEBUG - if (!t) - ABORT (); /* Internal error. */ -#endif - /* Fix timeout of next timer and decrementer if we were at the head of - the active list. */ - if (t->next) - { - t->next->tmout += t->tmout; - if (__spu_timers_active == t) - __reset_spu_decr (t->next->tmout); - } - else - __reset_spu_decr (CLOCK_START_VALUE); - - *pn = t->next; /* Update this elements to pointer. */ - t->next = __spu_timers_stopped; - __spu_timers_stopped = t; - - __spu_timers[id].state = SPU_TIMER_STOPPED; - - if (__likely (was_enabled)) - spu_ienable (); - - return 0; - } - - return SPU_TIMER_ERR_NOT_ACTIVE; -} diff --git a/newlib/libc/machine/spu/spu_timer_svcs.c b/newlib/libc/machine/spu/spu_timer_svcs.c deleted file mode 100644 index 8e7013ccd..000000000 --- a/newlib/libc/machine/spu/spu_timer_svcs.c +++ /dev/null @@ -1,115 +0,0 @@ -/* -(C) Copyright IBM Corp. 2008 - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -* Redistributions in binary form must 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 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. -*/ - -/* SPU timer start and alloc library services. */ -#include -#include "spu_timer_internal.h" - -/* The timers. */ -spu_timer_t __spu_timers[SPU_TIMER_NTIMERS] __attribute__ ((aligned (16))); - -/* Active timer list. */ -spu_timer_t *__spu_timers_active; - -/* Stopped (allocated) timer list. */ -spu_timer_t *__spu_timers_stopped; - -/* List of timers being handled. */ -spu_timer_t *__spu_timers_handled; - -/* Bitmask of available timers. */ -unsigned __spu_timers_avail = - ((1 << (SPU_TIMER_NTIMERS - 1)) + ((1 << (SPU_TIMER_NTIMERS - 1)) - 1)); - -/* Allocates an SPU interval timer and returns the timer ID. Must be called - before starting a timer. interval specifies the expiration interval in - timebase units. func specifies the function pointer to expiration handler. - Returns the timer ID on success or <0 on Failure: - * SPU_TIMER_ERR_NONE_FREE - no free timers to allocate - * SPU_TIMER_ERR_INVALID_PARM - invalid parm */ -int -spu_timer_alloc (int interval, void (*func) (int)) -{ - unsigned was_enabled; - int id; - if (interval < MIN_INTVL || interval > MAX_INTVL || func == NULL) - return SPU_TIMER_ERR_INVALID_PARM; - - was_enabled = spu_readch (SPU_RdMachStat) & 0x1; - - /* Get id of next available timer. */ - id = spu_extract ((spu_sub ((unsigned) 31, - spu_cntlz (spu_promote - (__spu_timers_avail, 0)))), 0); - - /* No timers avail. */ - if (id == -1) - return SPU_TIMER_ERR_NONE_FREE; - - /* Higher order bits represent lower timer ids. */ - __spu_timers_avail &= ~(1 << (id)); - id = (SPU_TIMER_NTIMERS - 1) - id; - - /* Initialize timer and put it on stopped list. */ - (__spu_timers + id)->func = func; - (__spu_timers + id)->intvl = interval; - (__spu_timers + id)->id = id; - (__spu_timers + id)->state = SPU_TIMER_STOPPED; - - spu_idisable (); - (__spu_timers + id)->next = __spu_timers_stopped; - __spu_timers_stopped = &__spu_timers[id]; - - if (__likely (was_enabled)) - spu_ienable (); - return id; -} - -/* External interface for starting a timer. See description of - __spu_timer_start(). Returns 0 on success and <0 on failure: - * SPU_TIMER_ERR_INVALID_ID - invalid id - * SPU_TIMER_ERR_NOCLOCK - clock is off - * SPU_TIMER_ERR_NOT_STOPPED - timer not in stopped state */ -int -spu_timer_start (int id) -{ - if (id < 0 || id >= SPU_TIMER_NTIMERS) - return SPU_TIMER_ERR_INVALID_ID; - - if (__spu_clock_startcnt == 0) - return SPU_TIMER_ERR_NOCLOCK; - - if (__spu_timers[id].state != SPU_TIMER_STOPPED) - return SPU_TIMER_ERR_NOT_STOPPED; - - __spu_timer_start (id, 1); - - return 0; -} diff --git a/newlib/libc/machine/spu/sscanf.S b/newlib/libc/machine/spu/sscanf.S index a3dbb0193..980955aaf 100644 --- a/newlib/libc/machine/spu/sscanf.S +++ b/newlib/libc/machine/spu/sscanf.S @@ -33,7 +33,6 @@ .text .align 4 GLOBL sscanf - .type sscanf, @function sscanf: stqd $0, 16($sp) /* save caller address */ il $2, 2 /* number of fixed arguments */ @@ -48,4 +47,3 @@ sscanf: a $sp, $sp, $2 lqd $0, 16($sp) /* load caller address */ bi $0 /* return to caller */ - .size sscanf, .-sscanf diff --git a/newlib/libc/machine/spu/stack_reg_va.S b/newlib/libc/machine/spu/stack_reg_va.S index 754e4e6a7..5a0b632e8 100644 --- a/newlib/libc/machine/spu/stack_reg_va.S +++ b/newlib/libc/machine/spu/stack_reg_va.S @@ -85,7 +85,6 @@ .text .global __stack_reg_va - .type __stack_reg_va, @function __stack_reg_va: @@ -165,6 +164,3 @@ save_regs_2: ai ptr, ptr, -16 brz tmp, save_regs_1 /* if (tmp == 0) jump */ bi link /* finish to make va_list */ - - .size __stack_reg_va, .-__stack_reg_va - diff --git a/newlib/libc/machine/spu/straddr.h b/newlib/libc/machine/spu/straddr.h deleted file mode 100644 index 3de594df6..000000000 --- a/newlib/libc/machine/spu/straddr.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - (C) Copyright 2008 - 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 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 -#include "vec_literal.h" - -/* - * Supply the inline _straddr for use by strncpy and strncat. -* -* _straddr: search the string s, and return the address of the first byte -* containing zero. -*/ -static inline char *_straddr(const char *s) -{ - unsigned int cnt, cmp, skip, mask; - vec_uchar16 *ptr, data; - - /* - * Compensate for unaligned strings. - */ - ptr = (vec_uchar16 *)s; /* implicit (s & ~0xf) */ - skip = (unsigned int)(ptr) & 0xf; - /* - * skip the first skip bytes starting at (s & ~0xf). - */ - mask = 0xFFFF >> skip; - - data = *ptr; - cmp = spu_extract(spu_gather(spu_cmpeq(data, 0)), 0); - cmp &= mask; - - cnt = spu_extract(spu_cntlz(spu_promote(cmp, 0)), 0); - - while (cnt == 32) { - data = *++ptr; - cnt = spu_extract(spu_cntlz(spu_gather(spu_cmpeq(data, 0))), 0); - /* - * The first 16 bits for gather on a byte vector are zero, so if cnt - * is 32, none of the 16 bytes in data was zero. And, there are (cnt - - * 16) non-zero bytes in data. - */ - } - /* - * The first non-zero byte is at ptr aligned down plus the number of - * non-zero bytes seen. - */ - return ((char*) (((int) ptr & ~0xf) + (cnt - 16))); -} diff --git a/newlib/libc/machine/spu/strcat.c b/newlib/libc/machine/spu/strcat.c index 9a5185c1b..902049e6c 100644 --- a/newlib/libc/machine/spu/strcat.c +++ b/newlib/libc/machine/spu/strcat.c @@ -1,6 +1,9 @@ /* - (C) Copyright 2008 + (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 @@ -27,20 +30,26 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - +#include #include #include -#include "straddr.h" -#include "strcpy.h" -/* - * Appends the string pointed to by src (up to and including the /0 - * character) to the array pointed to by dest overwriting the +/* Appends the string pointed to by src (up to and including the /0 + * character) to the array pointed to by dest (overwriting the * /0 character at the end of dest. The strings may not overlap and * the dest string must have enough space for the result. */ + char *strcat(char * __restrict__ dest, const char * __restrict__ src) { - _strncpy(_straddr(dest), src, 0, 0, 0); - return dest; + size_t d_len, s_len; + + /* Determine the length of the src and dest input arrays. + */ + d_len = strlen(dest); + s_len = strlen(src); + + (void)memcpy((void *)(dest+d_len), (const void *)src, s_len + 1); + + return ((char *)dest); } diff --git a/newlib/libc/machine/spu/strcpy.c b/newlib/libc/machine/spu/strcpy.c index 69045bae8..4d71cf483 100644 --- a/newlib/libc/machine/spu/strcpy.c +++ b/newlib/libc/machine/spu/strcpy.c @@ -1,6 +1,9 @@ /* - (C) Copyright 2008 + (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 @@ -27,15 +30,19 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include #include -#include "strcpy.h" -/* - * Copy the string pointed to by src (up to and including the /0 +/* Copy the string pointed to by src (up to and including the /0 * character) into the array pointed to by dest. If copy between * two arrays that overlap, then behavior is undefined. */ + char * strcpy(char * __restrict__ dest, const char * __restrict__ src) { - return _strncpy(dest, src, 0, 0, 0); + /* Due to the need to support all alignment variances, this + * function can not easily be optimized. As a result, it is + * serviced using strlen and memcpy. + */ + return ((char *)memcpy((void *)dest, (const void *)src, strlen(src)+1)); } diff --git a/newlib/libc/machine/spu/strcpy.h b/newlib/libc/machine/spu/strcpy.h deleted file mode 100644 index b407eaf5b..000000000 --- a/newlib/libc/machine/spu/strcpy.h +++ /dev/null @@ -1,184 +0,0 @@ -/* - (C) Copyright 2008 - 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 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 -#include "vec_literal.h" - -/* - * Supply an inline _strncpy for strcpy/cat and strncpy/cat. Relies on - * checklen and lastzero code being optimized out when they are constant - * zero values. - */ -static inline void * _strncpy(char * __restrict__ dest, const char * - __restrict__ src, size_t maxlen, int - checklen, int lastzero) -{ - int adjust, offset, soffset, doffset, shift; - vec_uchar16 *vsrc, *vdest; - vec_uchar16 sdata1, sdata2, sdata, shuffle; - vec_uchar16 mask1, maskzero, cmp0; - vec_uint4 nonzeroes, gathered_cmp, vtmp, vtmp2; - vec_uint4 curlen; /* assumes size_t is 4 bytes */ - const vec_uint4 val31 = { 31, 31, 31, 31 }; - const vec_uint4 val_0123 = { 0x00010203, 0x04050607, 0x08090A0B, 0x0C0D0E0F }; - const vec_uchar16 all_ones = { 0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff, - 0xff,0xff,0xff,0xff, 0xff,0xff,0xff,0xff }; - - vsrc = (vec_uchar16 *) src; - vdest = (vec_uchar16 *) dest; - soffset = (int) src & 15; - doffset = (int) dest & 15; - - if (checklen) { - /* - * Set curlen so it is the number of bytes we would copy if starting - * from vdest & ~0xf. - * - * curlen could probably be replaced by comparing vdest plus some - * offset to dest + maxlen, that would help mainly in the while loop - * but would lose only one instruction (the curlen -= 16). - */ - curlen = spu_splats((unsigned int) (maxlen + doffset)); - } - - /* - * Setup a shuffle pattern to align the source string with the - * alignment of the destination string. - */ - vtmp = spu_cmpgt(spu_promote(doffset, 0), spu_promote(soffset, 0)); - adjust = spu_extract(vtmp, 0); - offset = soffset - doffset; - offset += adjust & 16; - shuffle = spu_splats((unsigned char) offset); - shuffle = (vec_uchar16) spu_add((vec_uint4) shuffle, val_0123); - - vsrc += adjust; - sdata1 = *vsrc++; - sdata2 = *vsrc++; - sdata = spu_shuffle(sdata1, sdata2, shuffle); - - /* - * mask out leading bytes - */ - mask1 = spu_rlmaskqwbyte(all_ones, -doffset); - - cmp0 = spu_and(mask1, spu_cmpeq(sdata, 0)); - nonzeroes = spu_cntlz(spu_gather(cmp0)); - /* - * First element of nonzeroes - 15 is the number of leading non-zero - * bytes plus 1 for the zero byte. - */ - if (checklen) { - vtmp = spu_add(curlen, 15); - vtmp2 = spu_cmpgt(nonzeroes, vtmp); - nonzeroes = spu_sel(nonzeroes, vtmp, vtmp2); - } - - vtmp = spu_cmpgt(nonzeroes, val31); - /* - * Note: using immediate (constant 31) vs a vector value (val31) does - * not give different results, and we have to have a vector val31 for - * the spu_sel below, so use val31 everywhere. - */ - vtmp = spu_sel(nonzeroes, val31, vtmp); - /* - * So vtmp is now min(nonzeroes, 31), the number of bytes + 16 that we - * want to copy from the first 16 bytes of the source. - */ - if (checklen) { - curlen = spu_sub(vtmp, curlen); - curlen = spu_sub(15, curlen); - } - - /* - * We want a right shift 0xff with fill by ones of (vtmp - 15) bytes, but - * that doesn't exist so use spu_slqwbyte and vtmp all ones left by - * (31 - vtmp). Note: this can also use spu_rlqwbytebc with spu_rlqw. - */ - shift = spu_extract(spu_sub(val31, vtmp), 0); - maskzero = spu_slqwbyte(all_ones, shift); - maskzero = spu_and(mask1, maskzero); - *vdest = spu_sel(*vdest, sdata, maskzero); - - vtmp = spu_cmpgt(nonzeroes, val31); - if (checklen) { - vtmp2 = spu_cmpgt(curlen, 0); - vtmp = spu_and(vtmp, vtmp2); - } - if (spu_extract(vtmp, 0)) { - sdata1 = sdata2; - sdata2 = *vsrc++; - sdata = spu_shuffle(sdata1, sdata2, shuffle); - cmp0 = spu_cmpeq(sdata, 0); - gathered_cmp = spu_gather(cmp0); - /* - * Copy 16 bytes at a time. - */ - while ((spu_extract(gathered_cmp, 0) == 0) && - (!checklen || (spu_extract(curlen, 0) > 15))) { - if (checklen) - curlen = spu_add(curlen, -16); - *++vdest = sdata; - sdata1 = sdata2; - sdata2 = *vsrc++; - sdata = spu_shuffle(sdata1, sdata2, shuffle); - cmp0 = spu_cmpeq(sdata, 0); - gathered_cmp = spu_gather(cmp0); - } - /* - * Copy 0 to 15 trailing bytes, either up to the smaller of curlen or - * the number of non-zero bytes. - */ - nonzeroes = spu_cntlz(gathered_cmp); - if (checklen) { - vtmp = spu_add(curlen, 15); - vtmp2 = spu_cmpgt(nonzeroes, vtmp); - nonzeroes = spu_sel(nonzeroes, vtmp, vtmp2); - curlen = spu_sub(nonzeroes, curlen); - curlen = spu_sub(15, curlen); - } - shift = spu_extract(spu_sub(val31, nonzeroes), 0); - maskzero = spu_slqwbyte(all_ones, shift); - ++vdest; - *vdest = spu_sel(*vdest, sdata, maskzero); - } - - if (checklen && lastzero) { - /* - * For strncat. - */ - dest[maxlen - spu_extract(curlen, 0)] = '\0'; - } - - /* Pad null bytes if the length of the "src" is less than "n" (strncpy). */ - if (checklen && !lastzero && spu_extract(curlen, 0)) - memset(dest + maxlen - spu_extract(curlen, 0), 0, spu_extract(curlen, 0)); - return (dest); -} diff --git a/newlib/libc/machine/spu/strlen.c b/newlib/libc/machine/spu/strlen.c index a8403e045..8a7ae07ab 100644 --- a/newlib/libc/machine/spu/strlen.c +++ b/newlib/libc/machine/spu/strlen.c @@ -33,36 +33,34 @@ #include #include -/* - * Calculates the length of the string s, not including the terminating +/* Calculates the length of the string s, not including the terminating * \0 character. */ size_t strlen(const char *s) { + size_t len; unsigned int cnt, cmp, skip, mask; vec_uchar16 *ptr, data; - /* - * Compensate for initial mis-aligned string. + /* Compensate for initial mis-aligned string. */ - ptr = (vec_uchar16 *)s; /* implicit 16 byte alignment when dereferenced */ + ptr = (vec_uchar16 *)s; skip = (unsigned int)(ptr) & 15; mask = 0xFFFF >> skip; - data = *ptr; + data = *ptr++; cmp = spu_extract(spu_gather(spu_cmpeq(data, 0)), 0); cmp &= mask; cnt = spu_extract(spu_cntlz(spu_promote(cmp, 0)), 0); + len = cnt - (skip + 16); while (cnt == 32) { - data = *++ptr; + data = *ptr++; + len -= 16; cnt = spu_extract(spu_cntlz(spu_gather(spu_cmpeq(data, 0))), 0); + len += cnt; } - /* - * The length is ptr aligned down to a 16 byte boundary, plus the offset - * to the zero byte, minus the starting address s. - */ - return ((((int) ptr & ~0xf) + (cnt - 16)) - (int) s); + return (len); } diff --git a/newlib/libc/machine/spu/strncat.c b/newlib/libc/machine/spu/strncat.c index 3eeea7a77..4348a06ee 100644 --- a/newlib/libc/machine/spu/strncat.c +++ b/newlib/libc/machine/spu/strncat.c @@ -1,6 +1,9 @@ /* - (C) Copyright 2008 + (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 @@ -27,20 +30,68 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include #include #include -#include "straddr.h" -#include "strcpy.h" -/* - * Appends the string pointed to by src (up to and including the /0 +/* Appends the string pointed to by src (up to and including the /0 * character) to the array pointed to by dest (overwriting the * /0 character at the end of dest. The strings may not overlap and * the dest string must have enough space for the result. */ -char * strncat(char * __restrict__ dest, const char * __restrict__ src, - size_t n) + +char * strncat(char * __restrict__ dest, const char * __restrict__ src, size_t n) { - _strncpy(_straddr(dest), src, n, 1, 1); - return dest; + unsigned int cmp, skip, mask, len; + vec_uchar16 *ptr, data; + vec_uint4 cnt, gt, N; + char *dst; + + /* Determine the starting location to begin concatenation. + */ + dst = dest + strlen(dest); + + /* Copy the src image until either the src string terminates + * or n characters are copied. + */ + N = spu_promote((unsigned int)n, 0); + + /* Determine the string length, not including termination character, + * clamped to n characters. + */ + ptr = (vec_uchar16 *)src; + skip = (unsigned int)(ptr) & 15; + mask = 0xFFFF >> skip; + + data = *ptr++; + cmp = spu_extract(spu_gather(spu_cmpeq(data, 0)), 0); + cmp &= mask; + + cnt = spu_cntlz(spu_promote(cmp, 0)); + len = spu_extract(cnt, 0) - (skip + 16); + + gt = spu_cmpgt(spu_promote(len, 0), N); + + while (spu_extract(spu_andc(spu_cmpeq(cnt, 32), gt), 0)) { + data = *ptr++; + len -= 16; + cnt = spu_cntlz(spu_gather(spu_cmpeq(data, 0))); + len += spu_extract(cnt, 0); + + gt = spu_cmpgt(spu_promote(len, 0), N); + } + + /* len = MIN(len, n) + */ + len = spu_extract(spu_sel(spu_promote(len, 0), N, gt), 0); + + /* Perform a memcpy of the resulting length + */ + (void)memcpy((void *)dst, (const void *)src, len); + + /* Terminate the resulting concetenated string. + */ + dst[len] = '\0'; + + return (dest); } diff --git a/newlib/libc/machine/spu/strncmp.c b/newlib/libc/machine/spu/strncmp.c index d96504ca6..54d1fb9f4 100644 --- a/newlib/libc/machine/spu/strncmp.c +++ b/newlib/libc/machine/spu/strncmp.c @@ -30,17 +30,102 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include -#include "strncmp.h" +#include +#include "vec_literal.h" -/* - * Compare the two strings s1 and s2 of length n. Returns an integer less - * than, equal to, or greater than zero if s1 is found, respectively, +/* Compare the two strings s1 and s2 of length n. Returns an integer + * less than, equal to, or greater than zero if s1 is found, respectively, * to be less than, to match, or be greater than s2. */ + int strncmp(const char *s1, const char *s2, size_t n) { - vec_uint4 end_v; - return _strncmp_internal (s1, s2, n, &end_v, 1); + unsigned int offset1, offset2; + vec_int4 n_v; + vec_uint4 cnt1_v, cnt2_v, max_cnt_v; + vec_uint4 gt_v, lt_v, mask_v, end1_v, end2_v, end_v, neq_v; + vec_uint4 shift_n_v, shift_eos_v, max_shift_v; + vec_uchar16 shuffle1, shuffle2; + vec_uchar16 data1A, data1B, data1, data2A, data2B, data2; + vec_uchar16 *ptr1, *ptr2; + + data1 = data2 = spu_splats((unsigned char)0); + + ptr1 = (vec_uchar16 *)s1; + ptr2 = (vec_uchar16 *)s2; + + offset1 = (unsigned int)(ptr1) & 15; + offset2 = (unsigned int)(ptr2) & 15; + + shuffle1 = (vec_uchar16)spu_add((vec_uint4)spu_splats((unsigned char)offset1), + VEC_LITERAL(vec_uint4, 0x00010203, 0x04050607, 0x08090A0B, 0x0C0D0E0F)); + shuffle2 = (vec_uchar16)spu_add((vec_uint4)spu_splats((unsigned char)offset2), + VEC_LITERAL(vec_uint4, 0x00010203, 0x04050607, 0x08090A0B, 0x0C0D0E0F)); + data1A = *ptr1++; + data2A = *ptr2++; + + n_v = spu_promote((int)n, 0); + + do { + data1B = *ptr1++; + data2B = *ptr2++; + + /* Quadword align each of the input strings so that + * we operate on full quadwords. + */ + data1 = spu_shuffle(data1A, data1B, shuffle1); + data2 = spu_shuffle(data2A, data2B, shuffle2); + + data1A = data1B; + data2A = data2B; + + neq_v = spu_gather(spu_xor(spu_cmpeq(data1, data2), -1)); + + end1_v = spu_gather(spu_cmpeq(data1, 0)); + end2_v = spu_gather(spu_cmpeq(data2, 0)); + end_v = spu_or(end1_v, end2_v), 0; + + n_v = spu_add(n_v, -16); + + /* Repeat until either + * 1) the character count expired, + * 2) a null character is discovered in one of the input strings, or + * 3) the strings do not compare equal. + */ + } while (spu_extract(spu_and(spu_cmpeq(spu_or(end_v, neq_v), 0), spu_cmpgt(n_v, 0)), 0)); + + /* Construct a mask to eliminate characters that are not of interest + * in the comparison. Theses include characters that are beyond the + * n character count and beyond the first null character. + */ + cnt1_v = spu_cntlz(end1_v); + cnt2_v = spu_cntlz(end2_v); + + max_cnt_v = spu_sel(cnt1_v, cnt2_v, spu_cmpgt(cnt2_v, cnt1_v)); + + mask_v = spu_splats((unsigned int)0xFFFF); + + shift_n_v = spu_andc((__vector unsigned int)spu_sub(0, n_v), spu_cmpgt(n_v, -1)); + shift_eos_v = spu_sub(32, max_cnt_v); + + max_shift_v = spu_sel(shift_n_v, shift_eos_v, spu_cmpgt(shift_eos_v, shift_n_v)); + + mask_v = spu_and(spu_sl(mask_v, spu_extract(max_shift_v, 0)), mask_v); + + /* Determine if greater then or less then in the case that they are + * not equal. gt_v is either 1 (in the case s1 is greater then s2), or + * -1 (in the case that s2 is greater then s1). + */ + gt_v = spu_gather(spu_cmpgt(data1, data2)); + lt_v = spu_gather(spu_cmpgt(data2, data1)); + + gt_v = spu_sub(-1, spu_sl(spu_cmpgt(gt_v, lt_v), 1)); + + /* Construct a mask to be applied to gt_v if the strings are discovered + * to be equal. + */ + mask_v = spu_cmpeq(spu_and(neq_v, mask_v), 0); + + return (spu_extract(spu_andc(gt_v, mask_v), 0)); } diff --git a/newlib/libc/machine/spu/strncmp.h b/newlib/libc/machine/spu/strncmp.h deleted file mode 100644 index f464564bc..000000000 --- a/newlib/libc/machine/spu/strncmp.h +++ /dev/null @@ -1,155 +0,0 @@ -/* - (C) Copyright 2001,2006,2008 - 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 -#include - -/* - * Internal _strncmp_internal for strncmp and memcmp: - * - * Compare the two strings s1 and s2 of length n. Returns an integer less - * than, equal to, or greater than zero if s1 is found, respectively, - * to be less than, to match, or be greater than s2. Check for zero bytes - * only if check_zeroes is set. In additin, the vector value *end_v will - * contain all zeroes if we hit a NUL character that caused the comparison - * to complete, *end_v is modified only if check_zeroes is set. - */ -static inline int -_strncmp_internal(const char *s1, const char *s2, size_t n, vec_uint4 - *end_v, int check_zeroes) -{ - unsigned int offset1, offset2; - vec_int4 n_v; - vec_uint4 cnt1_v, cnt2_v, max_cnt_v; - vec_uint4 gt_v, lt_v, mask_v, end1_v, end2_v, neq_v, tmp1_v; - vec_uint4 shift_n_v, shift_eos_v, max_shift_v; - vec_uchar16 shuffle1, shuffle2; - vec_uchar16 data1A, data1B, data1, data2A, data2B, data2; - vec_uchar16 *ptr1, *ptr2; - - data1 = data2 = spu_splats((unsigned char)0); - - ptr1 = (vec_uchar16 *)s1; - ptr2 = (vec_uchar16 *)s2; - - offset1 = (unsigned int)(ptr1) & 15; - offset2 = (unsigned int)(ptr2) & 15; - - shuffle1 = (vec_uchar16) - spu_add((vec_uint4)spu_splats((unsigned char)offset1), - ((vec_uint4) {0x00010203, 0x04050607, 0x08090A0B, 0x0C0D0E0F})); - shuffle2 = (vec_uchar16) - spu_add((vec_uint4)spu_splats((unsigned char)offset2), - ((vec_uint4) {0x00010203, 0x04050607, 0x08090A0B, 0x0C0D0E0F})); - data1A = *ptr1++; - data2A = *ptr2++; - - n_v = spu_promote((int)n, 0); - - do { - data1B = *ptr1++; - data2B = *ptr2++; - - /* - * Quadword align each of the input strings so that we operate on full - * quadwords. - */ - data1 = spu_shuffle(data1A, data1B, shuffle1); - data2 = spu_shuffle(data2A, data2B, shuffle2); - - data1A = data1B; - data2A = data2B; - - neq_v = spu_gather(spu_xor(spu_cmpeq(data1, data2), -1)); - - if (check_zeroes) { - end1_v = spu_gather(spu_cmpeq(data1, 0)); - end2_v = spu_gather(spu_cmpeq(data2, 0)); - *end_v = spu_or(end1_v, end2_v); - } - - n_v = spu_add(n_v, -16); - - /* - * Repeat until either - * 1) the character count expired - * 2) check_zeroes is set and a null character is discovered in one of - * the input strings - * 3) the strings do not compare equal - */ - if (check_zeroes) { - tmp1_v = spu_or(*end_v, neq_v); - tmp1_v = spu_cmpeq(tmp1_v, 0); - } else { - tmp1_v = spu_cmpeq(neq_v, 0); - } - tmp1_v = spu_and(tmp1_v, spu_cmpgt(n_v, 0)); - } while (spu_extract(tmp1_v, 0)); - - /* - * Construct a mask to eliminate characters that are not of interest - * in the comparison. - */ - mask_v = spu_splats((unsigned int)0xFFFF); - shift_n_v = - spu_andc((__vector unsigned int)spu_sub(0, n_v), spu_cmpgt(n_v, -1)); - if (check_zeroes) { - cnt1_v = spu_cntlz(end1_v); - cnt2_v = spu_cntlz(end2_v); - max_cnt_v = spu_sel(cnt1_v, cnt2_v, spu_cmpgt(cnt2_v, cnt1_v)); - shift_eos_v = spu_sub(32, max_cnt_v); - max_shift_v = - spu_sel(shift_n_v, shift_eos_v, spu_cmpgt(shift_eos_v, shift_n_v)); - mask_v = spu_and(spu_sl(mask_v, spu_extract(max_shift_v, 0)), mask_v); - } else { - mask_v = spu_and(spu_sl(mask_v, spu_extract(shift_n_v, 0)), mask_v); - } - - /* - * Determine if greater then or less then in the case that they are - * not equal. gt_v is either 1 (in the case s1 is greater then s2), or - * -1 (in the case that s2 is greater then s1). - * - * There are no byte vector math instructions, so we can't subtract - * data1 from data2. - */ - gt_v = spu_gather(spu_cmpgt(data1, data2)); - lt_v = spu_gather(spu_cmpgt(data2, data1)); - gt_v = spu_sub(-1, spu_sl(spu_cmpgt(gt_v, lt_v), 1)); - - /* - * Construct a mask to be applied to gt_v if the strings are discovered - * to be equal. - */ - mask_v = spu_cmpeq(spu_and(neq_v, mask_v), 0); - return (spu_extract(spu_andc(gt_v, mask_v), 0)); -} diff --git a/newlib/libc/machine/spu/strncpy.c b/newlib/libc/machine/spu/strncpy.c index 9c70b0401..334c3bb6c 100644 --- a/newlib/libc/machine/spu/strncpy.c +++ b/newlib/libc/machine/spu/strncpy.c @@ -1,6 +1,9 @@ /* - (C) Copyright 2008 + (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 @@ -27,16 +30,58 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include #include #include -#include "strcpy.h" -/* - * Copy the string up to n character from memory area src to memory area - * dest. The memory areas may not overlap. The strncpy subroutine returns - * a pointer to dest. +/* Copy the string up to n character from memory area src to + * memory area dest. The memory areas may not overlap. The + * strncpy subroutine returns a pointer to dest. */ char * strncpy(char * __restrict__ dest, const char * __restrict__ src, size_t n) { - return _strncpy(dest, src, n, 1, 0); + unsigned int len; + unsigned int cmp, skip, mask; + vec_uchar16 *ptr, data; + vec_uint4 cnt, gt, N; + + N = spu_promote((unsigned int)n, 0); + + /* Determine the string length, including termination character, + * clamped to n characters. + */ + ptr = (vec_uchar16 *)src; + skip = (unsigned int)(ptr) & 15; + mask = 0xFFFF >> skip; + + data = *ptr++; + cmp = spu_extract(spu_gather(spu_cmpeq(data, 0)), 0); + cmp &= mask; + + cnt = spu_cntlz(spu_promote(cmp, 0)); + len = spu_extract(cnt, 0) - (skip + 15); + + gt = spu_cmpgt(spu_promote(len, 0), N); + + while (spu_extract(spu_andc(spu_cmpeq(cnt, 32), gt), 0)) { + data = *ptr++; + len -= 16; + cnt = spu_cntlz(spu_gather(spu_cmpeq(data, 0))); + len += spu_extract(cnt, 0); + + gt = spu_cmpgt(spu_promote(len, 0), N); + } + + /* len = MIN(len, n) + */ + len = spu_extract(spu_sel(spu_promote((unsigned int)len, 0), N, gt), 0); + + /* Padding + */ + if (len != n) { + memset(dest + len, 0, n - len); + } + /* Perform a memcpy of the resulting length + */ + return ((char *)memcpy((void *)dest, (const void *)src, len)); } diff --git a/newlib/libc/machine/spu/sys/dirent.h b/newlib/libc/machine/spu/sys/dirent.h index 6a158ec4a..876d3c1e8 100644 --- a/newlib/libc/machine/spu/sys/dirent.h +++ b/newlib/libc/machine/spu/sys/dirent.h @@ -32,9 +32,6 @@ */ #ifndef _SYS_DIRENT_H #define _SYS_DIRENT_H -#ifdef __cplusplus -extern "C" { -#endif #define MAXNAMLEN 255 @@ -57,7 +54,4 @@ struct dirent *readdir (DIR *); void rewinddir(DIR *); void seekdir(DIR *dir, off_t offset); off_t telldir(DIR *dir); -#ifdef __cplusplus -} -#endif #endif diff --git a/newlib/libc/machine/spu/sys/errno.h b/newlib/libc/machine/spu/sys/errno.h index 85aafcfd5..28a327774 100644 --- a/newlib/libc/machine/spu/sys/errno.h +++ b/newlib/libc/machine/spu/sys/errno.h @@ -19,6 +19,10 @@ on which it is based, except values used or returned by syscalls must be those of the Linux ppc. */ +/* errno is not a global variable, because that would make using it + non-reentrant. Instead, its address is returned by the function + __errno. */ + #ifndef _SYS_ERRNO_H_ #ifdef __cplusplus extern "C" { @@ -27,8 +31,10 @@ extern "C" { #include -extern struct _reent _impure_data; -#define errno (_impure_data._errno) +#ifndef _REENT_ONLY +#define errno (*__errno()) +extern int *__errno _PARAMS ((void)); +#endif /* Please don't use these variables directly. Use strerror instead. */ diff --git a/newlib/libc/machine/spu/sys/linux_syscalls.h b/newlib/libc/machine/spu/sys/linux_syscalls.h deleted file mode 100644 index f14564139..000000000 --- a/newlib/libc/machine/spu/sys/linux_syscalls.h +++ /dev/null @@ -1,294 +0,0 @@ -/* -(C) Copyright IBM Corp. 2008 - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -* Redistributions in binary form must 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 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. - -Author: Ken Werner -*/ - -#ifndef __LINUX_SYSCALLS_H -#define __LINUX_SYSCALLS_H -#ifdef __cplusplus -extern "C" { -#endif - -/* The system call numbers. See kernel source file - include/asm-powerpc/unistd.h. */ -#define __NR_read 3 -#define __NR_write 4 -#define __NR_open 5 -#define __NR_close 6 -#define __NR_waitpid 7 -#define __NR_creat 8 -#define __NR_link 9 -#define __NR_unlink 10 - -#define __NR_chdir 12 -#define __NR_time 13 -#define __NR_mkdod 14 -#define __NR_chmod 15 -#define __NR_lchown 16 - -#define __NR_lseek 19 -#define __NR_getpid 20 - -#define __NR_setuid 23 -#define __NR_getuid 24 -#define __NR_stime 25 - -#define __NR_alarm 27 - -#define __NR_access 33 -#define __NR_nice 34 - -#define __NR_sync 36 -#define __NR_kill 37 -#define __NR_rename 38 -#define __NR_mkdir 39 -#define __NR_rmdir 40 -#define __NR_dup 41 -#define __NR_pipe 42 -#define __NR_times 43 - -#define __NR_brk 45 -#define __NR_setgid 46 -#define __NR_getgid 47 - -#define __NR_geteuid 49 -#define __NR_getegid 50 - -#define __NR_ioctl 54 -#define __NR_fcntl 55 - -#define __NR_setpgid 57 - -#define __NR_umask 60 -#define __NR_chroot 61 - -#define __NR_dup2 63 -#define __NR_getppid 64 -#define __NR_getpgrp 65 -#define __NR_setsid 66 - -#define __NR_sgetmask 68 -#define __NR_ssetmask 69 -#define __NR_setreuid 70 -#define __NR_setregid 71 - -#define __NR_sethostname 74 -#define __NR_setrlimit 75 - -#define __NR_getrusage 77 -#define __NR_gettimeofday 78 -#define __NR_settimeofday 79 -#define __NR_getgroups 80 -#define __NR_setgroups 81 - -#define __NR_symlink 83 - -#define __NR_readlink 85 - -#define __NR_mmap 90 -#define __NR_munmap 91 -#define __NR_truncate 92 -#define __NR_ftruncate 93 -#define __NR_fchmod 94 -#define __NR_fchown 95 -#define __NR_getpriority 96 -#define __NR_setpriority 97 - -#define __NR_socketcall 102 -#define __NR_syslog 103 -#define __NR_setitimer 104 -#define __NR_getitimer 105 -#define __NR_newstat 106 -#define __NR_newlstat 107 -#define __NR_newfstat 108 - -#define __NR_vhangup 111 - -#define __NR_wait4 114 - -#define __NR_sysinfo 116 - -#define __NR_fsync 118 - -#define __NR_setdomainname 121 -#define __NR_newuname 122 - -#define __NR_adjtimex 124 -#define __NR_mprotect 125 - -#define __NR_getpgid 132 -#define __NR_fchdir 133 -#define __NR_bdflush 134 - -#define __NR_personality 136 - -#define __NR_setfsuid 138 -#define __NR_setfsgid 139 -#define __NR__llseek 140 -#define __NR_getdents 141 -#define __NR__newselect 142 -#define __NR_flock 143 -#define __NR_msync 144 -#define __NR_readv 145 -#define __NR_writev 146 -#define __NR_getsid 147 -#define __NR_fdatasync 148 - -#define __NR_mlock 150 -#define __NR_munlock 151 -#define __NR_mlockall 152 -#define __NR_munlockall 153 -#define __NR_sched_setparam 154 -#define __NR_sched_getparam 155 -#define __NR_sched_setscheduler 156 -#define __NR_sched_getscheduler 157 -#define __NR_sched_yield 158 -#define __NR_sched_get_priority_max 159 -#define __NR_sched_get_priority_min 160 -#define __NR_sched_rr_get_interval 161 -#define __NR_nanosleep 162 -#define __NR_mremap 163 -#define __NR_setresuid 164 -#define __NR_getresuid 165 - -#define __NR_poll 167 - -#define __NR_setresgid 169 -#define __NR_getresgid 170 -#define __NR_prctl 171 - -#define __NR_pread64 179 -#define __NR_pwrite64 180 -#define __NR_chown 181 -#define __NR_getcwd 182 -#define __NR_capget 183 -#define __NR_capset 184 - -#define __NR_sendfile 185 - -#define __NR_getrlimit 190 -#define __NR_readahead 191 - -#define __NR_getdents64 202 -#define __NR_pivot_root 203 - -#define __NR_madvise 205 -#define __NR_mincore 206 -#define __NR_gettid 207 -#define __NR_tkill 208 -#define __NR_setxattr 209 -#define __NR_lsetxattr 210 -#define __NR_fsetxattr 211 -#define __NR_getxattr 212 -#define __NR_lgetxattr 213 -#define __NR_fgetxattr 214 -#define __NR_listxattr 215 -#define __NR_llistxattr 216 -#define __NR_flistxattr 217 -#define __NR_removexattr 218 -#define __NR_lremovexattr 219 -#define __NR_fremovexattr 220 -#define __NR_futex 221 -#define __NR_sched_setaffinity 222 -#define __NR_sched_getaffinity 223 - -#define __NR_io_setup 227 -#define __NR_io_destroy 228 -#define __NR_io_getevents 229 -#define __NR_io_submit 230 -#define __NR_io_cancel 231 - -#define __NR_fadvise64 233 - -#define __NR_epoll_create 236 -#define __NR_epoll_ctl 237 -#define __NR_epoll_wait 238 -#define __NR_remap_file_pages 239 -#define __NR_timer_create 240 -#define __NR_timer_settime 241 -#define __NR_timer_gettime 242 -#define __NR_timer_getoverrun 243 -#define __NR_timer_delete 244 -#define __NR_clock_settime 245 -#define __NR_clock_gettime 246 -#define __NR_clock_getres 247 -#define __NR_clock_nanosleep 248 - -#define __NR_tgkill 250 -#define __NR_utimes 251 -#define __NR_statfs64 252 -#define __NR_fstatfs64 253 - -#define __NR_rtas 255 - -#define __NR_unshare 282 -#define __NR_splice 283 -#define __NR_tee 284 -#define __NR_vmsplice 285 -#define __NR_openat 286 -#define __NR_mkdirat 287 -#define __NR_mknodat 288 -#define __NR_fchownat 289 -#define __NR_futimesat 290 -#define __NR_fstatat64 291 -#define __NR_unlinkat 292 -#define __NR_renameat 293 -#define __NR_linkat 294 -#define __NR_symlinkat 295 -#define __NR_readlinkat 296 -#define __NR_fchmodat 297 -#define __NR_faccessat 298 -#define __NR_get_robust_list 299 -#define __NR_set_robust_list 300 -#define __NR_move_pages 301 -#define __NR_getcpu 302 - -#define __NR_utimensat 304 -#define __NR_signalfd 305 -#define __NR_timerfd 306 -#define __NR_eventfd 307 -#define __NR_sync_file_range2 308 - - -/* System callbacks from the SPU. See kernel source file - include/asm-powerpc/spu.h. */ -struct spu_syscall_block -{ - unsigned long long nr_ret; /* System call nr and return value. */ - unsigned long long parm[6]; /* System call arguments. */ -}; - -/* Issues a Linux system call. */ -int __linux_syscall (struct spu_syscall_block *s); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/newlib/libc/machine/spu/sys/sched.h b/newlib/libc/machine/spu/sys/sched.h index 60d95c925..90c274c37 100644 --- a/newlib/libc/machine/spu/sys/sched.h +++ b/newlib/libc/machine/spu/sys/sched.h @@ -1,12 +1,6 @@ #ifndef _SYS_SCHED_H #define _SYS_SCHED_H -#ifdef __cplusplus -extern "C" { -#endif int sched_yield(void); -#ifdef __cplusplus -} -#endif #endif diff --git a/newlib/libc/machine/spu/sys/syscall.h b/newlib/libc/machine/spu/sys/syscall.h index caac53105..3a358a61b 100644 --- a/newlib/libc/machine/spu/sys/syscall.h +++ b/newlib/libc/machine/spu/sys/syscall.h @@ -1,10 +1,4 @@ #ifndef _SYS_SYSCALL_H #define _SYS_SYSCALL_H -#ifdef __cplusplus -extern "C" { -#endif int __send_to_ppe(unsigned int signalcode, unsigned int opcode, void *data); -#ifdef __cplusplus -} -#endif #endif -- cgit v1.2.3