diff options
| author | Xavier ASUS <xavi92psx@gmail.com> | 2019-10-18 00:31:54 +0200 |
|---|---|---|
| committer | Xavier ASUS <xavi92psx@gmail.com> | 2019-10-18 00:31:54 +0200 |
| commit | 268a53de823a6750d6256ee1fb1e7707b4b45740 (patch) | |
| tree | 42c1799a9a82b2f7d9790ee9fe181d72a7274751 /device/lib/pic16/libm | |
| download | sdcc-gas-268a53de823a6750d6256ee1fb1e7707b4b45740.tar.gz | |
sdcc-3.9.0 fork implementing GNU assembler syntax
This fork aims to provide better support for stm8-binutils
Diffstat (limited to 'device/lib/pic16/libm')
59 files changed, 3016 insertions, 0 deletions
diff --git a/device/lib/pic16/libm/.deps/acosf.Po b/device/lib/pic16/libm/.deps/acosf.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/device/lib/pic16/libm/.deps/acosf.Po @@ -0,0 +1 @@ +# dummy diff --git a/device/lib/pic16/libm/.deps/asincosf.Po b/device/lib/pic16/libm/.deps/asincosf.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/device/lib/pic16/libm/.deps/asincosf.Po @@ -0,0 +1 @@ +# dummy diff --git a/device/lib/pic16/libm/.deps/asinf.Po b/device/lib/pic16/libm/.deps/asinf.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/device/lib/pic16/libm/.deps/asinf.Po @@ -0,0 +1 @@ +# dummy diff --git a/device/lib/pic16/libm/.deps/atan2f.Po b/device/lib/pic16/libm/.deps/atan2f.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/device/lib/pic16/libm/.deps/atan2f.Po @@ -0,0 +1 @@ +# dummy diff --git a/device/lib/pic16/libm/.deps/atanf.Po b/device/lib/pic16/libm/.deps/atanf.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/device/lib/pic16/libm/.deps/atanf.Po @@ -0,0 +1 @@ +# dummy diff --git a/device/lib/pic16/libm/.deps/ceilf.Po b/device/lib/pic16/libm/.deps/ceilf.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/device/lib/pic16/libm/.deps/ceilf.Po @@ -0,0 +1 @@ +# dummy diff --git a/device/lib/pic16/libm/.deps/cosf.Po b/device/lib/pic16/libm/.deps/cosf.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/device/lib/pic16/libm/.deps/cosf.Po @@ -0,0 +1 @@ +# dummy diff --git a/device/lib/pic16/libm/.deps/coshf.Po b/device/lib/pic16/libm/.deps/coshf.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/device/lib/pic16/libm/.deps/coshf.Po @@ -0,0 +1 @@ +# dummy diff --git a/device/lib/pic16/libm/.deps/cotf.Po b/device/lib/pic16/libm/.deps/cotf.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/device/lib/pic16/libm/.deps/cotf.Po @@ -0,0 +1 @@ +# dummy diff --git a/device/lib/pic16/libm/.deps/errno.Po b/device/lib/pic16/libm/.deps/errno.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/device/lib/pic16/libm/.deps/errno.Po @@ -0,0 +1 @@ +# dummy diff --git a/device/lib/pic16/libm/.deps/expf.Po b/device/lib/pic16/libm/.deps/expf.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/device/lib/pic16/libm/.deps/expf.Po @@ -0,0 +1 @@ +# dummy diff --git a/device/lib/pic16/libm/.deps/fabsf.Po b/device/lib/pic16/libm/.deps/fabsf.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/device/lib/pic16/libm/.deps/fabsf.Po @@ -0,0 +1 @@ +# dummy diff --git a/device/lib/pic16/libm/.deps/floorf.Po b/device/lib/pic16/libm/.deps/floorf.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/device/lib/pic16/libm/.deps/floorf.Po @@ -0,0 +1 @@ +# dummy diff --git a/device/lib/pic16/libm/.deps/frexpf.Po b/device/lib/pic16/libm/.deps/frexpf.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/device/lib/pic16/libm/.deps/frexpf.Po @@ -0,0 +1 @@ +# dummy diff --git a/device/lib/pic16/libm/.deps/isinf.Po b/device/lib/pic16/libm/.deps/isinf.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/device/lib/pic16/libm/.deps/isinf.Po @@ -0,0 +1 @@ +# dummy diff --git a/device/lib/pic16/libm/.deps/isnan.Po b/device/lib/pic16/libm/.deps/isnan.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/device/lib/pic16/libm/.deps/isnan.Po @@ -0,0 +1 @@ +# dummy diff --git a/device/lib/pic16/libm/.deps/ldexpf.Po b/device/lib/pic16/libm/.deps/ldexpf.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/device/lib/pic16/libm/.deps/ldexpf.Po @@ -0,0 +1 @@ +# dummy diff --git a/device/lib/pic16/libm/.deps/log10f.Po b/device/lib/pic16/libm/.deps/log10f.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/device/lib/pic16/libm/.deps/log10f.Po @@ -0,0 +1 @@ +# dummy diff --git a/device/lib/pic16/libm/.deps/logf.Po b/device/lib/pic16/libm/.deps/logf.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/device/lib/pic16/libm/.deps/logf.Po @@ -0,0 +1 @@ +# dummy diff --git a/device/lib/pic16/libm/.deps/modff.Po b/device/lib/pic16/libm/.deps/modff.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/device/lib/pic16/libm/.deps/modff.Po @@ -0,0 +1 @@ +# dummy diff --git a/device/lib/pic16/libm/.deps/powf.Po b/device/lib/pic16/libm/.deps/powf.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/device/lib/pic16/libm/.deps/powf.Po @@ -0,0 +1 @@ +# dummy diff --git a/device/lib/pic16/libm/.deps/sincosf.Po b/device/lib/pic16/libm/.deps/sincosf.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/device/lib/pic16/libm/.deps/sincosf.Po @@ -0,0 +1 @@ +# dummy diff --git a/device/lib/pic16/libm/.deps/sincoshf.Po b/device/lib/pic16/libm/.deps/sincoshf.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/device/lib/pic16/libm/.deps/sincoshf.Po @@ -0,0 +1 @@ +# dummy diff --git a/device/lib/pic16/libm/.deps/sinf.Po b/device/lib/pic16/libm/.deps/sinf.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/device/lib/pic16/libm/.deps/sinf.Po @@ -0,0 +1 @@ +# dummy diff --git a/device/lib/pic16/libm/.deps/sinhf.Po b/device/lib/pic16/libm/.deps/sinhf.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/device/lib/pic16/libm/.deps/sinhf.Po @@ -0,0 +1 @@ +# dummy diff --git a/device/lib/pic16/libm/.deps/sqrtf.Po b/device/lib/pic16/libm/.deps/sqrtf.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/device/lib/pic16/libm/.deps/sqrtf.Po @@ -0,0 +1 @@ +# dummy diff --git a/device/lib/pic16/libm/.deps/tancotf.Po b/device/lib/pic16/libm/.deps/tancotf.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/device/lib/pic16/libm/.deps/tancotf.Po @@ -0,0 +1 @@ +# dummy diff --git a/device/lib/pic16/libm/.deps/tanf.Po b/device/lib/pic16/libm/.deps/tanf.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/device/lib/pic16/libm/.deps/tanf.Po @@ -0,0 +1 @@ +# dummy diff --git a/device/lib/pic16/libm/.deps/tanhf.Po b/device/lib/pic16/libm/.deps/tanhf.Po new file mode 100644 index 0000000..9ce06a8 --- /dev/null +++ b/device/lib/pic16/libm/.deps/tanhf.Po @@ -0,0 +1 @@ +# dummy diff --git a/device/lib/pic16/libm/Makefile b/device/lib/pic16/libm/Makefile new file mode 100644 index 0000000..4c139f7 --- /dev/null +++ b/device/lib/pic16/libm/Makefile @@ -0,0 +1,745 @@ +# Makefile.in generated by automake 1.16.1 from Makefile.am. +# libm/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2018 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/pic16lib +pkgincludedir = $(includedir)/pic16lib +pkglibdir = $(libdir)/pic16lib +pkglibexecdir = $(libexecdir)/pic16lib +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +subdir = libm +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = \ + $(top_srcdir)/../../non-free/lib/pic16/supported-devices.ac \ + $(top_srcdir)/../../non-free/lib/pic16/processors.ac \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(libdir)" +LIBRARIES = $(lib_LIBRARIES) +AM_V_AR = $(am__v_AR_$(V)) +am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +libm18f_a_AR = $(AR) $(ARFLAGS) +libm18f_a_LIBADD = +am_libm18f_a_OBJECTS = acosf.$(OBJEXT) asincosf.$(OBJEXT) \ + asinf.$(OBJEXT) atan2f.$(OBJEXT) atanf.$(OBJEXT) \ + ceilf.$(OBJEXT) cosf.$(OBJEXT) coshf.$(OBJEXT) cotf.$(OBJEXT) \ + errno.$(OBJEXT) expf.$(OBJEXT) fabsf.$(OBJEXT) \ + floorf.$(OBJEXT) frexpf.$(OBJEXT) isinf.$(OBJEXT) \ + isnan.$(OBJEXT) ldexpf.$(OBJEXT) log10f.$(OBJEXT) \ + logf.$(OBJEXT) modff.$(OBJEXT) powf.$(OBJEXT) \ + sincosf.$(OBJEXT) sincoshf.$(OBJEXT) sinf.$(OBJEXT) \ + sinhf.$(OBJEXT) sqrtf.$(OBJEXT) tancotf.$(OBJEXT) \ + tanf.$(OBJEXT) tanhf.$(OBJEXT) +libm18f_a_OBJECTS = $(am_libm18f_a_OBJECTS) +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I. -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/acosf.Po ./$(DEPDIR)/asincosf.Po \ + ./$(DEPDIR)/asinf.Po ./$(DEPDIR)/atan2f.Po \ + ./$(DEPDIR)/atanf.Po ./$(DEPDIR)/ceilf.Po ./$(DEPDIR)/cosf.Po \ + ./$(DEPDIR)/coshf.Po ./$(DEPDIR)/cotf.Po ./$(DEPDIR)/errno.Po \ + ./$(DEPDIR)/expf.Po ./$(DEPDIR)/fabsf.Po ./$(DEPDIR)/floorf.Po \ + ./$(DEPDIR)/frexpf.Po ./$(DEPDIR)/isinf.Po \ + ./$(DEPDIR)/isnan.Po ./$(DEPDIR)/ldexpf.Po \ + ./$(DEPDIR)/log10f.Po ./$(DEPDIR)/logf.Po ./$(DEPDIR)/modff.Po \ + ./$(DEPDIR)/powf.Po ./$(DEPDIR)/sincosf.Po \ + ./$(DEPDIR)/sincoshf.Po ./$(DEPDIR)/sinf.Po \ + ./$(DEPDIR)/sinhf.Po ./$(DEPDIR)/sqrtf.Po \ + ./$(DEPDIR)/tancotf.Po ./$(DEPDIR)/tanf.Po \ + ./$(DEPDIR)/tanhf.Po +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(libm18f_a_SOURCES) +DIST_SOURCES = $(libm18f_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/Makefile.common \ + $(top_srcdir)/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = aclocal-1.16 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = '/usr/bin/gplib' +ARCH = 18f452 +ARFLAGS = -c +AUTOCONF = autoconf +AUTOHEADER = autoheader +AUTOMAKE = automake-1.16 +AWK = gawk +CC = '/home/xavier/sdcc/device/lib/pic16//../../../bin/sdcc' +CCAS = '/usr/bin/gpasm' +CCASDEPMODE = depmode=none +CCASFLAGS = -p18f452 +CCDEPMODE = depmode=none +CFLAGS = -mpic16 -p18f452 +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO_C = +ECHO_N = -n +ECHO_T = +GOOD_PICS = 18f1220 18f1230 18f1320 18f1330 18f13k22 18f13k50 18f14k22 18f14k50 18f2220 18f2221 18f2320 18f2321 18f2331 18f23k20 18f23k22 18f2410 18f242 18f2420 18f2423 18f2431 18f2439 18f2450 18f2455 18f2458 18f248 18f2480 18f24j10 18f24j11 18f24j50 18f24k20 18f24k22 18f24k50 18f2510 18f2515 18f252 18f2520 18f2523 18f2525 18f2539 18f2550 18f2553 18f258 18f2580 18f2585 18f25j10 18f25j11 18f25j50 18f25k20 18f25k22 18f25k50 18f25k80 18f2610 18f2620 18f2680 18f2682 18f2685 18f26j11 18f26j13 18f26j50 18f26j53 18f26k20 18f26k22 18f26k80 18f27j13 18f27j53 18f4220 18f4221 18f4320 18f4321 18f4331 18f43k20 18f43k22 18f4410 18f442 18f4420 18f4423 18f4431 18f4439 18f4450 18f4455 18f4458 18f448 18f4480 18f44j10 18f44j11 18f44j50 18f44k20 18f44k22 18f4510 18f4515 18f452 18f4520 18f4523 18f4525 18f4539 18f4550 18f4553 18f458 18f4580 18f4585 18f45j10 18f45j11 18f45j50 18f45k20 18f45k22 18f45k50 18f45k80 18f4610 18f4620 18f4680 18f4682 18f4685 18f46j11 18f46j13 18f46j50 18f46j53 18f46k20 18f46k22 18f46k80 18f47j13 18f47j53 18f6310 18f6390 18f6393 18f63j11 18f63j90 18f6410 18f6490 18f6493 18f64j11 18f64j90 18f6520 18f6525 18f6527 18f6585 18f65j10 18f65j11 18f65j15 18f65j50 18f65j90 18f65j94 18f65k22 18f65k80 18f65k90 18f6620 18f6621 18f6622 18f6627 18f6628 18f6680 18f66j10 18f66j11 18f66j15 18f66j16 18f66j50 18f66j55 18f66j60 18f66j65 18f66j90 18f66j93 18f66j94 18f66j99 18f66k22 18f66k80 18f66k90 18f6720 18f6722 18f6723 18f67j10 18f67j11 18f67j50 18f67j60 18f67j90 18f67j93 18f67j94 18f67k22 18f67k90 18f8310 18f8390 18f8393 18f83j11 18f83j90 18f8410 18f8490 18f8493 18f84j11 18f84j90 18f8520 18f8525 18f8527 18f8585 18f85j10 18f85j11 18f85j15 18f85j50 18f85j90 18f85j94 18f85k22 18f85k90 18f8620 18f8621 18f8622 18f8627 18f8628 18f8680 18f86j10 18f86j11 18f86j15 18f86j16 18f86j50 18f86j55 18f86j60 18f86j65 18f86j72 18f86j90 18f86j93 18f86j94 18f86j99 18f86k22 18f86k90 18f8720 18f8722 18f8723 18f87j10 18f87j11 18f87j50 18f87j60 18f87j72 18f87j90 18f87j93 18f87j94 18f87k22 18f87k90 18f95j94 18f96j60 18f96j65 18f96j94 18f96j99 18f97j60 18f97j94 18lf13k22 18lf13k50 18lf14k22 18lf14k50 18lf23k22 18lf24j10 18lf24j11 18lf24j50 18lf24k22 18lf24k50 18lf25j10 18lf25j11 18lf25j50 18lf25k22 18lf25k50 18lf25k80 18lf26j11 18lf26j13 18lf26j50 18lf26j53 18lf26k22 18lf26k80 18lf27j13 18lf27j53 18lf43k22 18lf44j10 18lf44j11 18lf44j50 18lf44k22 18lf45j10 18lf45j11 18lf45j50 18lf45k22 18lf45k50 18lf45k80 18lf46j11 18lf46j13 18lf46j50 18lf46j53 18lf46k22 18lf46k80 18lf47j13 18lf47j53 18lf65k80 18lf66k80 +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LD = '/usr/bin/gplink' +LIBOBJS = +LIBS = +LTLIBOBJS = +MAKEINFO = makeinfo +MKDIR_P = /bin/mkdir -p +OBJEXT = o +PACKAGE = pic16lib +PACKAGE_BUGREPORT = tecodev AT users sourceforge net +PACKAGE_NAME = pic16lib +PACKAGE_STRING = pic16lib 0.3 +PACKAGE_TARNAME = pic16lib +PACKAGE_URL = +PACKAGE_VERSION = 0.3 +PATH_SEPARATOR = : +RANLIB = : +SET_MAKE = +SHELL = /bin/bash +STRIP = +USE_FLOATS = -DUSE_FLOATS=0 +VERSION = 0.3 +abs_builddir = /home/xavier/sdcc/device/lib/pic16/libm +abs_srcdir = /home/xavier/sdcc/device/lib/pic16/libm +abs_top_builddir = /home/xavier/sdcc/device/lib/pic16 +abs_top_srcdir = /home/xavier/sdcc/device/lib/pic16 +am__include = include +am__leading_dot = . +am__quote = +am__tar = $${TAR-tar} chof - "$$tardir" +am__untar = $${TAR-tar} xf - +bindir = ${exec_prefix}/bin +build_alias = +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE} +dvidir = ${docdir} +exec_prefix = ${prefix} +host_alias = +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = ${SHELL} /home/xavier/sdcc/device/lib/pic16/install-sh +libdir = ${exec_prefix}/lib/pic16 +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = ${localstatedir}/run +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = ../ +top_builddir = .. +top_srcdir = .. +lib_LIBRARIES = libm18f.a +libm18f_a_SOURCES = acosf.c asincosf.c asinf.c atan2f.c atanf.c \ + ceilf.c cosf.c coshf.c cotf.c errno.c expf.c fabsf.c floorf.c \ + frexpf.c isinf.c isnan.c ldexpf.c log10f.c logf.c modff.c \ + powf.c sincosf.c sincoshf.c sinf.c sinhf.c sqrtf.c tancotf.c \ + tanf.c tanhf.c +AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ + -I$(top_srcdir)/../../non-free/include/pic16 +#AM_CFLAGS += --no-optimize-goto + +#AM_CFLAGS += --debug-ralloc +#AM_CFLAGS += --debug-xtra +#AM_CFLAGS += --pcode-verbose + +#AM_CFLAGS += --nooverlay +#AM_CFLAGS += --nogcse +#AM_CFLAGS += --nolabelopt +#AM_CFLAGS += --noinvariant +#AM_CFLAGS += --noinduction +#AM_CFLAGS += --nojtbound +#AM_CFLAGS += --noloopreverse +AM_CFLAGS = --std-c11 --asm="$(CCAS)" --no-warn-non-free \ + --fomit-frame-pointer --obanksel=9 --denable-peeps \ + --optimize-cmp --optimize-df --i-code-in-asm -DUSE_FLOATS=0 +AM_CCASFLAGS = -I$(top_srcdir)/../../include/pic16 \ + -I$(top_srcdir)/../../non-free/include/pic16 -I$(srcdir) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/Makefile.common $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libm/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign libm/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; +$(top_srcdir)/Makefile.common $(am__empty): + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-libLIBRARIES: $(lib_LIBRARIES) + @$(NORMAL_INSTALL) + @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ + echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(INSTALL_DATA) $$list2 "$(DESTDIR)$(libdir)" || exit $$?; } + @$(POST_INSTALL) + @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + if test -f $$p; then \ + $(am__strip_dir) \ + echo " ( cd '$(DESTDIR)$(libdir)' && $(RANLIB) $$f )"; \ + ( cd "$(DESTDIR)$(libdir)" && $(RANLIB) $$f ) || exit $$?; \ + else :; fi; \ + done + +uninstall-libLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(libdir)'; $(am__uninstall_files_from_dir) + +clean-libLIBRARIES: + -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES) + +libm18f.a: $(libm18f_a_OBJECTS) $(libm18f_a_DEPENDENCIES) $(EXTRA_libm18f_a_DEPENDENCIES) + $(AM_V_at)-rm -f libm18f.a + $(AM_V_AR)$(libm18f_a_AR) libm18f.a $(libm18f_a_OBJECTS) $(libm18f_a_LIBADD) + $(AM_V_at)$(RANLIB) libm18f.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/acosf.Po # am--include-marker +include ./$(DEPDIR)/asincosf.Po # am--include-marker +include ./$(DEPDIR)/asinf.Po # am--include-marker +include ./$(DEPDIR)/atan2f.Po # am--include-marker +include ./$(DEPDIR)/atanf.Po # am--include-marker +include ./$(DEPDIR)/ceilf.Po # am--include-marker +include ./$(DEPDIR)/cosf.Po # am--include-marker +include ./$(DEPDIR)/coshf.Po # am--include-marker +include ./$(DEPDIR)/cotf.Po # am--include-marker +include ./$(DEPDIR)/errno.Po # am--include-marker +include ./$(DEPDIR)/expf.Po # am--include-marker +include ./$(DEPDIR)/fabsf.Po # am--include-marker +include ./$(DEPDIR)/floorf.Po # am--include-marker +include ./$(DEPDIR)/frexpf.Po # am--include-marker +include ./$(DEPDIR)/isinf.Po # am--include-marker +include ./$(DEPDIR)/isnan.Po # am--include-marker +include ./$(DEPDIR)/ldexpf.Po # am--include-marker +include ./$(DEPDIR)/log10f.Po # am--include-marker +include ./$(DEPDIR)/logf.Po # am--include-marker +include ./$(DEPDIR)/modff.Po # am--include-marker +include ./$(DEPDIR)/powf.Po # am--include-marker +include ./$(DEPDIR)/sincosf.Po # am--include-marker +include ./$(DEPDIR)/sincoshf.Po # am--include-marker +include ./$(DEPDIR)/sinf.Po # am--include-marker +include ./$(DEPDIR)/sinhf.Po # am--include-marker +include ./$(DEPDIR)/sqrtf.Po # am--include-marker +include ./$(DEPDIR)/tancotf.Po # am--include-marker +include ./$(DEPDIR)/tanf.Po # am--include-marker +include ./$(DEPDIR)/tanhf.Po # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: +# $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +# $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po + $(AM_V_CC)source='$<' object='$@' libtool=no \ + DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ + $(AM_V_CC_no)$(COMPILE) -c -o $@ $< + +.c.obj: +# $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +# $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po + $(AM_V_CC)source='$<' object='$@' libtool=no \ + DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ + $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(libdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libLIBRARIES clean-local mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/acosf.Po + -rm -f ./$(DEPDIR)/asincosf.Po + -rm -f ./$(DEPDIR)/asinf.Po + -rm -f ./$(DEPDIR)/atan2f.Po + -rm -f ./$(DEPDIR)/atanf.Po + -rm -f ./$(DEPDIR)/ceilf.Po + -rm -f ./$(DEPDIR)/cosf.Po + -rm -f ./$(DEPDIR)/coshf.Po + -rm -f ./$(DEPDIR)/cotf.Po + -rm -f ./$(DEPDIR)/errno.Po + -rm -f ./$(DEPDIR)/expf.Po + -rm -f ./$(DEPDIR)/fabsf.Po + -rm -f ./$(DEPDIR)/floorf.Po + -rm -f ./$(DEPDIR)/frexpf.Po + -rm -f ./$(DEPDIR)/isinf.Po + -rm -f ./$(DEPDIR)/isnan.Po + -rm -f ./$(DEPDIR)/ldexpf.Po + -rm -f ./$(DEPDIR)/log10f.Po + -rm -f ./$(DEPDIR)/logf.Po + -rm -f ./$(DEPDIR)/modff.Po + -rm -f ./$(DEPDIR)/powf.Po + -rm -f ./$(DEPDIR)/sincosf.Po + -rm -f ./$(DEPDIR)/sincoshf.Po + -rm -f ./$(DEPDIR)/sinf.Po + -rm -f ./$(DEPDIR)/sinhf.Po + -rm -f ./$(DEPDIR)/sqrtf.Po + -rm -f ./$(DEPDIR)/tancotf.Po + -rm -f ./$(DEPDIR)/tanf.Po + -rm -f ./$(DEPDIR)/tanhf.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-libLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/acosf.Po + -rm -f ./$(DEPDIR)/asincosf.Po + -rm -f ./$(DEPDIR)/asinf.Po + -rm -f ./$(DEPDIR)/atan2f.Po + -rm -f ./$(DEPDIR)/atanf.Po + -rm -f ./$(DEPDIR)/ceilf.Po + -rm -f ./$(DEPDIR)/cosf.Po + -rm -f ./$(DEPDIR)/coshf.Po + -rm -f ./$(DEPDIR)/cotf.Po + -rm -f ./$(DEPDIR)/errno.Po + -rm -f ./$(DEPDIR)/expf.Po + -rm -f ./$(DEPDIR)/fabsf.Po + -rm -f ./$(DEPDIR)/floorf.Po + -rm -f ./$(DEPDIR)/frexpf.Po + -rm -f ./$(DEPDIR)/isinf.Po + -rm -f ./$(DEPDIR)/isnan.Po + -rm -f ./$(DEPDIR)/ldexpf.Po + -rm -f ./$(DEPDIR)/log10f.Po + -rm -f ./$(DEPDIR)/logf.Po + -rm -f ./$(DEPDIR)/modff.Po + -rm -f ./$(DEPDIR)/powf.Po + -rm -f ./$(DEPDIR)/sincosf.Po + -rm -f ./$(DEPDIR)/sincoshf.Po + -rm -f ./$(DEPDIR)/sinf.Po + -rm -f ./$(DEPDIR)/sinhf.Po + -rm -f ./$(DEPDIR)/sqrtf.Po + -rm -f ./$(DEPDIR)/tancotf.Po + -rm -f ./$(DEPDIR)/tanf.Po + -rm -f ./$(DEPDIR)/tanhf.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-libLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-generic clean-libLIBRARIES clean-local cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am \ + install-libLIBRARIES install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-libLIBRARIES + +.PRECIOUS: Makefile + + +# Use the generic code where possible. +%.c: ../../%.c + test -e $(<D)/pic16/libm/$(@F) || ln -s $^ $@ + test -e $@ || ln -s $(<D)/pic16/libm/$(@F) $@ + +clean-local: + $(RM) *.asm; + $(RM) *.lst; + +clean-intermediate: clean-local + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $@ in $$subdir"; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@); \ + done + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/device/lib/pic16/libm/Makefile.am b/device/lib/pic16/libm/Makefile.am new file mode 100644 index 0000000..b3056ef --- /dev/null +++ b/device/lib/pic16/libm/Makefile.am @@ -0,0 +1,42 @@ +## Makefile.am -- Process this file with automake to produce Makefile.in + +lib_LIBRARIES = libm18f.a + +libm18f_a_SOURCES = +libm18f_a_SOURCES += acosf.c +libm18f_a_SOURCES += asincosf.c +libm18f_a_SOURCES += asinf.c +libm18f_a_SOURCES += atan2f.c +libm18f_a_SOURCES += atanf.c +libm18f_a_SOURCES += ceilf.c +libm18f_a_SOURCES += cosf.c +libm18f_a_SOURCES += coshf.c +libm18f_a_SOURCES += cotf.c +libm18f_a_SOURCES += errno.c +libm18f_a_SOURCES += expf.c +libm18f_a_SOURCES += fabsf.c +libm18f_a_SOURCES += floorf.c +libm18f_a_SOURCES += frexpf.c +libm18f_a_SOURCES += isinf.c +libm18f_a_SOURCES += isnan.c +libm18f_a_SOURCES += ldexpf.c +libm18f_a_SOURCES += log10f.c +libm18f_a_SOURCES += logf.c +libm18f_a_SOURCES += modff.c +libm18f_a_SOURCES += powf.c +libm18f_a_SOURCES += sincosf.c +libm18f_a_SOURCES += sincoshf.c +libm18f_a_SOURCES += sinf.c +libm18f_a_SOURCES += sinhf.c +libm18f_a_SOURCES += sqrtf.c +libm18f_a_SOURCES += tancotf.c +libm18f_a_SOURCES += tanf.c +libm18f_a_SOURCES += tanhf.c + +# Use the generic code where possible. +%.c: ../../%.c + test -e $(<D)/pic16/libm/$(@F) || ln -s $^ $@ + test -e $@ || ln -s $(<D)/pic16/libm/$(@F) $@ + +include $(top_srcdir)/Makefile.common + diff --git a/device/lib/pic16/libm/Makefile.in b/device/lib/pic16/libm/Makefile.in new file mode 100644 index 0000000..6728a39 --- /dev/null +++ b/device/lib/pic16/libm/Makefile.in @@ -0,0 +1,745 @@ +# Makefile.in generated by automake 1.16.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2018 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +subdir = libm +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = \ + $(top_srcdir)/../../non-free/lib/pic16/supported-devices.ac \ + $(top_srcdir)/../../non-free/lib/pic16/processors.ac \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(libdir)" +LIBRARIES = $(lib_LIBRARIES) +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +libm18f_a_AR = $(AR) $(ARFLAGS) +libm18f_a_LIBADD = +am_libm18f_a_OBJECTS = acosf.$(OBJEXT) asincosf.$(OBJEXT) \ + asinf.$(OBJEXT) atan2f.$(OBJEXT) atanf.$(OBJEXT) \ + ceilf.$(OBJEXT) cosf.$(OBJEXT) coshf.$(OBJEXT) cotf.$(OBJEXT) \ + errno.$(OBJEXT) expf.$(OBJEXT) fabsf.$(OBJEXT) \ + floorf.$(OBJEXT) frexpf.$(OBJEXT) isinf.$(OBJEXT) \ + isnan.$(OBJEXT) ldexpf.$(OBJEXT) log10f.$(OBJEXT) \ + logf.$(OBJEXT) modff.$(OBJEXT) powf.$(OBJEXT) \ + sincosf.$(OBJEXT) sincoshf.$(OBJEXT) sinf.$(OBJEXT) \ + sinhf.$(OBJEXT) sqrtf.$(OBJEXT) tancotf.$(OBJEXT) \ + tanf.$(OBJEXT) tanhf.$(OBJEXT) +libm18f_a_OBJECTS = $(am_libm18f_a_OBJECTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/acosf.Po ./$(DEPDIR)/asincosf.Po \ + ./$(DEPDIR)/asinf.Po ./$(DEPDIR)/atan2f.Po \ + ./$(DEPDIR)/atanf.Po ./$(DEPDIR)/ceilf.Po ./$(DEPDIR)/cosf.Po \ + ./$(DEPDIR)/coshf.Po ./$(DEPDIR)/cotf.Po ./$(DEPDIR)/errno.Po \ + ./$(DEPDIR)/expf.Po ./$(DEPDIR)/fabsf.Po ./$(DEPDIR)/floorf.Po \ + ./$(DEPDIR)/frexpf.Po ./$(DEPDIR)/isinf.Po \ + ./$(DEPDIR)/isnan.Po ./$(DEPDIR)/ldexpf.Po \ + ./$(DEPDIR)/log10f.Po ./$(DEPDIR)/logf.Po ./$(DEPDIR)/modff.Po \ + ./$(DEPDIR)/powf.Po ./$(DEPDIR)/sincosf.Po \ + ./$(DEPDIR)/sincoshf.Po ./$(DEPDIR)/sinf.Po \ + ./$(DEPDIR)/sinhf.Po ./$(DEPDIR)/sqrtf.Po \ + ./$(DEPDIR)/tancotf.Po ./$(DEPDIR)/tanf.Po \ + ./$(DEPDIR)/tanhf.Po +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(libm18f_a_SOURCES) +DIST_SOURCES = $(libm18f_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/Makefile.common \ + $(top_srcdir)/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +ARCH = @ARCH@ +ARFLAGS = @ARFLAGS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +GOOD_PICS = @GOOD_PICS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_FLOATS = @USE_FLOATS@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build_alias = @build_alias@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host_alias = @host_alias@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +lib_LIBRARIES = libm18f.a +libm18f_a_SOURCES = acosf.c asincosf.c asinf.c atan2f.c atanf.c \ + ceilf.c cosf.c coshf.c cotf.c errno.c expf.c fabsf.c floorf.c \ + frexpf.c isinf.c isnan.c ldexpf.c log10f.c logf.c modff.c \ + powf.c sincosf.c sincoshf.c sinf.c sinhf.c sqrtf.c tancotf.c \ + tanf.c tanhf.c +AM_CPPFLAGS = -I. -I$(top_srcdir)/../../include/pic16 \ + -I$(top_srcdir)/../../non-free/include/pic16 +#AM_CFLAGS += --no-optimize-goto + +#AM_CFLAGS += --debug-ralloc +#AM_CFLAGS += --debug-xtra +#AM_CFLAGS += --pcode-verbose + +#AM_CFLAGS += --nooverlay +#AM_CFLAGS += --nogcse +#AM_CFLAGS += --nolabelopt +#AM_CFLAGS += --noinvariant +#AM_CFLAGS += --noinduction +#AM_CFLAGS += --nojtbound +#AM_CFLAGS += --noloopreverse +AM_CFLAGS = --std-c11 --asm="$(CCAS)" --no-warn-non-free \ + --fomit-frame-pointer --obanksel=9 --denable-peeps \ + --optimize-cmp --optimize-df --i-code-in-asm @USE_FLOATS@ +AM_CCASFLAGS = -I$(top_srcdir)/../../include/pic16 \ + -I$(top_srcdir)/../../non-free/include/pic16 -I$(srcdir) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/Makefile.common $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libm/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign libm/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; +$(top_srcdir)/Makefile.common $(am__empty): + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-libLIBRARIES: $(lib_LIBRARIES) + @$(NORMAL_INSTALL) + @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ + echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(INSTALL_DATA) $$list2 "$(DESTDIR)$(libdir)" || exit $$?; } + @$(POST_INSTALL) + @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + if test -f $$p; then \ + $(am__strip_dir) \ + echo " ( cd '$(DESTDIR)$(libdir)' && $(RANLIB) $$f )"; \ + ( cd "$(DESTDIR)$(libdir)" && $(RANLIB) $$f ) || exit $$?; \ + else :; fi; \ + done + +uninstall-libLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(libdir)'; $(am__uninstall_files_from_dir) + +clean-libLIBRARIES: + -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES) + +libm18f.a: $(libm18f_a_OBJECTS) $(libm18f_a_DEPENDENCIES) $(EXTRA_libm18f_a_DEPENDENCIES) + $(AM_V_at)-rm -f libm18f.a + $(AM_V_AR)$(libm18f_a_AR) libm18f.a $(libm18f_a_OBJECTS) $(libm18f_a_LIBADD) + $(AM_V_at)$(RANLIB) libm18f.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acosf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asincosf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asinf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atan2f.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atanf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ceilf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cosf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coshf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cotf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/errno.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/expf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fabsf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/floorf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frexpf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isinf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnan.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ldexpf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log10f.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modff.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/powf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sincosf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sincoshf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sinf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sinhf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sqrtf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tancotf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tanf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tanhf.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(libdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libLIBRARIES clean-local mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/acosf.Po + -rm -f ./$(DEPDIR)/asincosf.Po + -rm -f ./$(DEPDIR)/asinf.Po + -rm -f ./$(DEPDIR)/atan2f.Po + -rm -f ./$(DEPDIR)/atanf.Po + -rm -f ./$(DEPDIR)/ceilf.Po + -rm -f ./$(DEPDIR)/cosf.Po + -rm -f ./$(DEPDIR)/coshf.Po + -rm -f ./$(DEPDIR)/cotf.Po + -rm -f ./$(DEPDIR)/errno.Po + -rm -f ./$(DEPDIR)/expf.Po + -rm -f ./$(DEPDIR)/fabsf.Po + -rm -f ./$(DEPDIR)/floorf.Po + -rm -f ./$(DEPDIR)/frexpf.Po + -rm -f ./$(DEPDIR)/isinf.Po + -rm -f ./$(DEPDIR)/isnan.Po + -rm -f ./$(DEPDIR)/ldexpf.Po + -rm -f ./$(DEPDIR)/log10f.Po + -rm -f ./$(DEPDIR)/logf.Po + -rm -f ./$(DEPDIR)/modff.Po + -rm -f ./$(DEPDIR)/powf.Po + -rm -f ./$(DEPDIR)/sincosf.Po + -rm -f ./$(DEPDIR)/sincoshf.Po + -rm -f ./$(DEPDIR)/sinf.Po + -rm -f ./$(DEPDIR)/sinhf.Po + -rm -f ./$(DEPDIR)/sqrtf.Po + -rm -f ./$(DEPDIR)/tancotf.Po + -rm -f ./$(DEPDIR)/tanf.Po + -rm -f ./$(DEPDIR)/tanhf.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-libLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/acosf.Po + -rm -f ./$(DEPDIR)/asincosf.Po + -rm -f ./$(DEPDIR)/asinf.Po + -rm -f ./$(DEPDIR)/atan2f.Po + -rm -f ./$(DEPDIR)/atanf.Po + -rm -f ./$(DEPDIR)/ceilf.Po + -rm -f ./$(DEPDIR)/cosf.Po + -rm -f ./$(DEPDIR)/coshf.Po + -rm -f ./$(DEPDIR)/cotf.Po + -rm -f ./$(DEPDIR)/errno.Po + -rm -f ./$(DEPDIR)/expf.Po + -rm -f ./$(DEPDIR)/fabsf.Po + -rm -f ./$(DEPDIR)/floorf.Po + -rm -f ./$(DEPDIR)/frexpf.Po + -rm -f ./$(DEPDIR)/isinf.Po + -rm -f ./$(DEPDIR)/isnan.Po + -rm -f ./$(DEPDIR)/ldexpf.Po + -rm -f ./$(DEPDIR)/log10f.Po + -rm -f ./$(DEPDIR)/logf.Po + -rm -f ./$(DEPDIR)/modff.Po + -rm -f ./$(DEPDIR)/powf.Po + -rm -f ./$(DEPDIR)/sincosf.Po + -rm -f ./$(DEPDIR)/sincoshf.Po + -rm -f ./$(DEPDIR)/sinf.Po + -rm -f ./$(DEPDIR)/sinhf.Po + -rm -f ./$(DEPDIR)/sqrtf.Po + -rm -f ./$(DEPDIR)/tancotf.Po + -rm -f ./$(DEPDIR)/tanf.Po + -rm -f ./$(DEPDIR)/tanhf.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-libLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-generic clean-libLIBRARIES clean-local cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am \ + install-libLIBRARIES install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-libLIBRARIES + +.PRECIOUS: Makefile + + +# Use the generic code where possible. +%.c: ../../%.c + test -e $(<D)/pic16/libm/$(@F) || ln -s $^ $@ + test -e $@ || ln -s $(<D)/pic16/libm/$(@F) $@ + +clean-local: + $(RM) *.asm; + $(RM) *.lst; + +clean-intermediate: clean-local + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $@ in $$subdir"; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@); \ + done + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/device/lib/pic16/libm/acosf.c b/device/lib/pic16/libm/acosf.c new file mode 100644 index 0000000..63191ae --- /dev/null +++ b/device/lib/pic16/libm/acosf.c @@ -0,0 +1,43 @@ +/*------------------------------------------------------------------------- + acosf.c - Computes arc cosine of a 32-bit float + + Copyright (C) 2001, 2002, Jesus Calvino-Fraga <jesusc At ieee.org> + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + As a special exception, if you link this library with other files, + some of which are compiled with SDCC, to produce an executable, + this library does not by itself cause the resulting executable to + be covered by the GNU General Public License. This exception does + not however invalidate any other reasons why the executable file + might be covered by the GNU General Public License. +-------------------------------------------------------------------------*/ + +#include <math.h> + +float asincosf(float x, int isacos); + +float +acosf (float x) _MATH_REENTRANT +{ + if (x == 1.0) + return 0.0; + else if (x == -1.0) + return PI; + else if (x == 0.0) + return HALF_PI; + return asincosf (x, 1); +} diff --git a/device/lib/pic16/libm/asincosf.c b/device/lib/pic16/libm/asincosf.c new file mode 100644 index 0000000..7130dfe --- /dev/null +++ b/device/lib/pic16/libm/asincosf.c @@ -0,0 +1,89 @@ +/*------------------------------------------------------------------------- + asincosf.c - Computes asin or acos of a 32-bit float as outlined in [1] + + Copyright (C) 2001, 2002, Jesus Calvino-Fraga <jesusc At ieee.org> + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + As a special exception, if you link this library with other files, + some of which are compiled with SDCC, to produce an executable, + this library does not by itself cause the resulting executable to + be covered by the GNU General Public License. This exception does + not however invalidate any other reasons why the executable file + might be covered by the GNU General Public License. +-------------------------------------------------------------------------*/ + +/* [1] William James Cody and W. M. Waite. _Software manual for the + elementary functions_, Englewood Cliffs, N.J.:Prentice-Hall, 1980. */ + +#include <math.h> +#include <errno.h> + +#define P1 0.933935835E+0 +#define P2 -0.504400557E+0 +#define Q0 0.560363004E+1 +#define Q1 -0.554846723E+1 +#define Q2 0.100000000E+1 + +#define P(g) (P2*g+P1) +#define Q(g) ((Q2*g+Q1)*g+Q0) + +float asincosf(float x, int isacos) +{ + float y, g, r; + int i; + + static const float a[2]={ 0.0, QUART_PI }; + static const float b[2]={ HALF_PI, QUART_PI }; + + y=fabsf(x); + i=isacos; + if (y < EPS) r=y; + else + { + if (y > 0.5) + { + i=1-i; + if (y > 1.0) + { + errno=EDOM; + return 0.0; + } + g=(0.5-y)+0.5; + g=ldexpf(g,-1); + y=sqrtf(g); + y=-(y+y); + } + else + { + g=y*y; + } + r=y+y*((P(g)*g)/Q(g)); + } + if (isacos) + { + if (x < 0.0) + r=(b[i]+r)+b[i]; + else + r=(a[i]-r)+a[i]; + } + else + { + r=(a[i]+r)+a[i]; + if (x<0.0) r=-r; + } + return r; +} diff --git a/device/lib/pic16/libm/asinf.c b/device/lib/pic16/libm/asinf.c new file mode 100644 index 0000000..12c25eb --- /dev/null +++ b/device/lib/pic16/libm/asinf.c @@ -0,0 +1,39 @@ +/*------------------------------------------------------------------------- + asinf.c - Computes asin(x) + + Copyright (C) 2001, 2002, Jesus Calvino-Fraga <jesusc At ieee.org> + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + As a special exception, if you link this library with other files, + some of which are compiled with SDCC, to produce an executable, + this library does not by itself cause the resulting executable to + be covered by the GNU General Public License. This exception does + not however invalidate any other reasons why the executable file + might be covered by the GNU General Public License. +-------------------------------------------------------------------------*/ + +#include <math.h> + +float asincosf(float x, int isacos); + +float asinf(float x) _MATH_REENTRANT +{ + if(x== 1.0) return HALF_PI; + else if(x==-1.0) return -HALF_PI; + else if(x== 0.0) return 0.0; + else return asincosf(x,0); +} diff --git a/device/lib/pic16/libm/atan2f.c b/device/lib/pic16/libm/atan2f.c new file mode 100644 index 0000000..297f4e9 --- /dev/null +++ b/device/lib/pic16/libm/atan2f.c @@ -0,0 +1,53 @@ +/*------------------------------------------------------------------------- + atan2f.c - Computes atan2(x) where x is a 32-bit float. + + Copyright (C) 2001, 2002, Jesus Calvino-Fraga <jesusc At ieee.org> + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + As a special exception, if you link this library with other files, + some of which are compiled with SDCC, to produce an executable, + this library does not by itself cause the resulting executable to + be covered by the GNU General Public License. This exception does + not however invalidate any other reasons why the executable file + might be covered by the GNU General Public License. +-------------------------------------------------------------------------*/ + +#include <math.h> +#include <errno.h> + +float atan2f(float x, float y) +{ + float r; + + if ((x==0.0) && (y==0.0)) + { + errno=EDOM; + return 0.0; + } + + if(fabsf(y)>=fabsf(x)) + { + r=atanf(x/y); + if(y<0.0) r+=(x>=0?PI:-PI); + } + else + { + r=-atanf(y/x); + r+=(x<0.0?-HALF_PI:HALF_PI); + } + return r; +} diff --git a/device/lib/pic16/libm/atanf.c b/device/lib/pic16/libm/atanf.c new file mode 100644 index 0000000..d7d0090 --- /dev/null +++ b/device/lib/pic16/libm/atanf.c @@ -0,0 +1,77 @@ +/*------------------------------------------------------------------------- + atanf.c - Computes arctan of a 32-bit float as outlined in [1] + + Copyright (C) 2001, 2002, Jesus Calvino-Fraga <jesusc At ieee.org> + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + As a special exception, if you link this library with other files, + some of which are compiled with SDCC, to produce an executable, + this library does not by itself cause the resulting executable to + be covered by the GNU General Public License. This exception does + not however invalidate any other reasons why the executable file + might be covered by the GNU General Public License. +-------------------------------------------------------------------------*/ + +/* [1] William James Cody and W. M. Waite. _Software manual for the + elementary functions_, Englewood Cliffs, N.J.:Prentice-Hall, 1980. */ + +#include <math.h> +#include <errno.h> + +#define P0 -0.4708325141E+0 +#define P1 -0.5090958253E-1 +#define Q0 0.1412500740E+1 +#define Q1 0.1000000000E+1 + +#define P(g,f) ((P1*g+P0)*g*f) +#define Q(g) (Q1*g+Q0) + +#define K1 0.2679491924 /* 2-sqrt(3) */ +#define K2 0.7320508076 /* sqrt(3)-1 */ +#define K3 1.7320508076 /* sqrt(3) */ + +float atanf(float x) _MATH_REENTRANT +{ + float f, r, g; + int n=0; + static const float a[]={ 0.0, 0.5235987756, 1.5707963268, 1.0471975512 }; + + f=fabsf(x); + if(f>1.0) + { + f=1.0/f; + n=2; + } + if(f>K1) + { + f=((K2*f-1.0)+f)/(K3+f); + // What it is actually wanted is this more accurate formula, + // but SDCC optimizes it and then it does not work: + // f=(((K2*f-0.5)-0.5)+f)/(K3+f); + n++; + } + if(fabsf(f)<EPS) r=f; + else + { + g=f*f; + r=f+P(g,f)/Q(g); + } + if(n>1) r=-r; + r+=a[n]; + if(x<0.0) r=-r; + return r; +} diff --git a/device/lib/pic16/libm/ceilf.c b/device/lib/pic16/libm/ceilf.c new file mode 100644 index 0000000..98b428f --- /dev/null +++ b/device/lib/pic16/libm/ceilf.c @@ -0,0 +1,39 @@ +/*------------------------------------------------------------------------- + ceilf.c - Returns the integer larger or equal than x + + Copyright (C) 2001, 2002, Jesus Calvino-Fraga <jesusc At ieee.org> + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + As a special exception, if you link this library with other files, + some of which are compiled with SDCC, to produce an executable, + this library does not by itself cause the resulting executable to + be covered by the GNU General Public License. This exception does + not however invalidate any other reasons why the executable file + might be covered by the GNU General Public License. +-------------------------------------------------------------------------*/ + +#include <math.h> + +float ceilf(float x) _MATH_REENTRANT +{ + long r; + r=x; + if (r<0) + return r; + else + return (r+((r<x)?1:0)); +} diff --git a/device/lib/pic16/libm/cosf.c b/device/lib/pic16/libm/cosf.c new file mode 100644 index 0000000..e9f8820 --- /dev/null +++ b/device/lib/pic16/libm/cosf.c @@ -0,0 +1,37 @@ +/*------------------------------------------------------------------------- + cosf.c - Computes cos(x) where x is a 32-bit float. + + Copyright (C) 2001, 2002, Jesus Calvino-Fraga <jesusc At ieee.org> + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + As a special exception, if you link this library with other files, + some of which are compiled with SDCC, to produce an executable, + this library does not by itself cause the resulting executable to + be covered by the GNU General Public License. This exception does + not however invalidate any other reasons why the executable file + might be covered by the GNU General Public License. +-------------------------------------------------------------------------*/ + +#include <math.h> + +float sincosf(float x, int iscos); + +float cosf(float x) _MATH_REENTRANT +{ + if (x==0.0) return 1.0; + return sincosf(x, 1); +} diff --git a/device/lib/pic16/libm/coshf.c b/device/lib/pic16/libm/coshf.c new file mode 100644 index 0000000..7d8fd19 --- /dev/null +++ b/device/lib/pic16/libm/coshf.c @@ -0,0 +1,36 @@ +/*------------------------------------------------------------------------- + coshf.c - Computes cosh(x) where x is a 32-bit float. + + Copyright (C) 2001, 2002, Jesus Calvino-Fraga <jesusc At ieee.org> + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + As a special exception, if you link this library with other files, + some of which are compiled with SDCC, to produce an executable, + this library does not by itself cause the resulting executable to + be covered by the GNU General Public License. This exception does + not however invalidate any other reasons why the executable file + might be covered by the GNU General Public License. +-------------------------------------------------------------------------*/ + +#include <math.h> + +float sincoshf(float x, int iscosh); + +float coshf(float x) _MATH_REENTRANT +{ + return sincoshf(x, 1); +} diff --git a/device/lib/pic16/libm/cotf.c b/device/lib/pic16/libm/cotf.c new file mode 100644 index 0000000..71c7860 --- /dev/null +++ b/device/lib/pic16/libm/cotf.c @@ -0,0 +1,48 @@ +/*------------------------------------------------------------------------- + cotf.c - Computes cot(x) where x is a 32-bit float. + + Copyright (C) 2001, 2002, Jesus Calvino-Fraga <jesusc At ieee.org> + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + As a special exception, if you link this library with other files, + some of which are compiled with SDCC, to produce an executable, + this library does not by itself cause the resulting executable to + be covered by the GNU General Public License. This exception does + not however invalidate any other reasons why the executable file + might be covered by the GNU General Public License. +-------------------------------------------------------------------------*/ + +#include <math.h> +#include <errno.h> + +float tancotf(float x, int iscot); + +float cotf(float x) _MATH_REENTRANT +{ + float y; + + y=fabsf(x); + if (y<1.0E-30) //This one requires more thinking... + { + errno = ERANGE; + if (x<0.0) + return -XMAX; + else + return XMAX; + } + return tancotf(x, 1); +} diff --git a/device/lib/pic16/libm/errno.c b/device/lib/pic16/libm/errno.c new file mode 100644 index 0000000..710f92c --- /dev/null +++ b/device/lib/pic16/libm/errno.c @@ -0,0 +1,29 @@ +/*------------------------------------------------------------------------- + errno.c - just declares errno as a variable + + Copyright (C) 2005, Vangelis Rokas <vrokas AT otenet.gr> + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + As a special exception, if you link this library with other files, + some of which are compiled with SDCC, to produce an executable, + this library does not by itself cause the resulting executable to + be covered by the GNU General Public License. This exception does + not however invalidate any other reasons why the executable file + might be covered by the GNU General Public License. +-------------------------------------------------------------------------*/ + +int errno; diff --git a/device/lib/pic16/libm/expf.c b/device/lib/pic16/libm/expf.c new file mode 100644 index 0000000..ba985f7 --- /dev/null +++ b/device/lib/pic16/libm/expf.c @@ -0,0 +1,93 @@ +/*------------------------------------------------------------------------- + expf.c - Computes e**x of a 32-bit float as outlined in [1] + + Copyright (C) 2001, 2002, Jesus Calvino-Fraga <jesusc At ieee.org> + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + As a special exception, if you link this library with other files, + some of which are compiled with SDCC, to produce an executable, + this library does not by itself cause the resulting executable to + be covered by the GNU General Public License. This exception does + not however invalidate any other reasons why the executable file + might be covered by the GNU General Public License. +-------------------------------------------------------------------------*/ + +/* [1] William James Cody and W. M. Waite. _Software manual for the + elementary functions_, Englewood Cliffs, N.J.:Prentice-Hall, 1980. */ + +#include <math.h> +#include <errno.h> + +#define P0 0.2499999995E+0 +#define P1 0.4160288626E-2 +#define Q0 0.5000000000E+0 +#define Q1 0.4998717877E-1 + +#define P(z) ((P1*z)+P0) +#define Q(z) ((Q1*z)+Q0) + +#define C1 0.693359375 +#define C2 -2.1219444005469058277e-4 + +#define BIGX 88.72283911 /* ln(XMAX) */ +#define EXPEPS 1.0E-7 /* exp(1.0E-7)=0.0000001 */ +#define K1 1.4426950409 /* 1/ln(2) */ + +float expf(float x) +{ + int n; + float xn, g, r, z, y; + char sign; + + if(x>=0.0) + { y=x; sign=0; } + else + { y=-x; sign=1; } + + if(y<EXPEPS) return 1.0; + + if(y>BIGX) + { + if(sign) + { + errno=ERANGE; + return XMAX; + } + else + { + return 0.0; + } + } + + z=y*K1; + n=z; + + if(n<0) --n; + if(z-n>=0.5) ++n; + xn=n; + g=((y-xn*C1))-xn*C2; + z=g*g; + r=P(z)*g; + r=0.5+(r/(Q(z)-r)); + + n++; + z=ldexpf(r, n); + if(sign) + return 1.0/z; + else + return z; +} diff --git a/device/lib/pic16/libm/fabsf.c b/device/lib/pic16/libm/fabsf.c new file mode 100644 index 0000000..30946d4 --- /dev/null +++ b/device/lib/pic16/libm/fabsf.c @@ -0,0 +1,39 @@ +/*------------------------------------------------------------------------- + fabsf.c - Returns the absolute value of a 32-bit float. + + Copyright (C) 2001, 2002, Jesus Calvino-Fraga <jesusc At ieee.org> + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + As a special exception, if you link this library with other files, + some of which are compiled with SDCC, to produce an executable, + this library does not by itself cause the resulting executable to + be covered by the GNU General Public License. This exception does + not however invalidate any other reasons why the executable file + might be covered by the GNU General Public License. +-------------------------------------------------------------------------*/ + +#include <math.h> +#include <errno.h> + +float fabsf(float x) _MATH_REENTRANT +{ + union float_long fl; + + fl.f = x; + fl.l &= 0x7fffffff; + return fl.f; +} diff --git a/device/lib/pic16/libm/floorf.c b/device/lib/pic16/libm/floorf.c new file mode 100644 index 0000000..a98786d --- /dev/null +++ b/device/lib/pic16/libm/floorf.c @@ -0,0 +1,39 @@ +/*------------------------------------------------------------------------- + floorf.c - Returns the integer smaller or equal than x + + Copyright (C) 2001, 2002, Jesus Calvino-Fraga <jesusc At ieee.org> + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + As a special exception, if you link this library with other files, + some of which are compiled with SDCC, to produce an executable, + this library does not by itself cause the resulting executable to + be covered by the GNU General Public License. This exception does + not however invalidate any other reasons why the executable file + might be covered by the GNU General Public License. +-------------------------------------------------------------------------*/ + +#include <math.h> + +float floorf (float x) _MATH_REENTRANT +{ + long r; + r=x; + if (r<=0) + return (r+((r>x)?-1:0)); + else + return r; +} diff --git a/device/lib/pic16/libm/frexpf.c b/device/lib/pic16/libm/frexpf.c new file mode 100644 index 0000000..e0dd890 --- /dev/null +++ b/device/lib/pic16/libm/frexpf.c @@ -0,0 +1,45 @@ +/*------------------------------------------------------------------------- + frexpf.c - Returns the exponent and mantisa of a 32 bit float. + + Copyright (C) 2001, 2002, Jesus Calvino-Fraga <jesusc At ieee.org> + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + As a special exception, if you link this library with other files, + some of which are compiled with SDCC, to produce an executable, + this library does not by itself cause the resulting executable to + be covered by the GNU General Public License. This exception does + not however invalidate any other reasons why the executable file + might be covered by the GNU General Public License. +-------------------------------------------------------------------------*/ + +#include <math.h> +#include <errno.h> + +float frexpf(float x, int *pw2) +{ + union float_long fl; + long int i; + + fl.f=x; + /* Find the exponent (power of 2) */ + i = ( fl.l >> 23) & 0x000000ff; + i -= 0x7e; + *pw2 = i; + fl.l &= 0x807fffff; /* strip all exponent bits */ + fl.l |= 0x3f000000; /* mantissa between 0.5 and 1 */ + return(fl.f); +} diff --git a/device/lib/pic16/libm/ldexpf.c b/device/lib/pic16/libm/ldexpf.c new file mode 100644 index 0000000..7530b2d --- /dev/null +++ b/device/lib/pic16/libm/ldexpf.c @@ -0,0 +1,44 @@ +/*------------------------------------------------------------------------- + ldexpf.c - Build a float from a mantisa and exponent. + + Copyright (C) 2001, 2002, Jesus Calvino-Fraga <jesusc At ieee.org> + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + As a special exception, if you link this library with other files, + some of which are compiled with SDCC, to produce an executable, + this library does not by itself cause the resulting executable to + be covered by the GNU General Public License. This exception does + not however invalidate any other reasons why the executable file + might be covered by the GNU General Public License. +-------------------------------------------------------------------------*/ + +#include <math.h> +#include <errno.h> + +float ldexpf(float x, int pw2) +{ + union float_long fl; + long e; + + fl.f = x; + + e=(fl.l >> 23) & 0x000000ff; + e+=pw2; + fl.l= ((e & 0xff) << 23) | (fl.l & 0x807fffff); + + return(fl.f); +} diff --git a/device/lib/pic16/libm/log10f.c b/device/lib/pic16/libm/log10f.c new file mode 100644 index 0000000..d9e57d0 --- /dev/null +++ b/device/lib/pic16/libm/log10f.c @@ -0,0 +1,35 @@ +/*------------------------------------------------------------------------- + log10f.c: Computes the base 10 log of a 32 bit float. + + Copyright (C) 2001, 2002, Jesus Calvino-Fraga <jesusc At ieee.org> + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + As a special exception, if you link this library with other files, + some of which are compiled with SDCC, to produce an executable, + this library does not by itself cause the resulting executable to + be covered by the GNU General Public License. This exception does + not however invalidate any other reasons why the executable file + might be covered by the GNU General Public License. +-------------------------------------------------------------------------*/ + +#include <math.h> +#include <errno.h> + +float log10f(float x) _MATH_REENTRANT +{ + return logf(x)*0.4342944819; +} diff --git a/device/lib/pic16/libm/logf.c b/device/lib/pic16/libm/logf.c new file mode 100644 index 0000000..46e1af6 --- /dev/null +++ b/device/lib/pic16/libm/logf.c @@ -0,0 +1,78 @@ +/*------------------------------------------------------------------------- + logf.c: Computes the natural log of a 32 bit float as outlined in [1]. + + Copyright (C) 2001, 2002, Jesus Calvino-Fraga <jesusc At ieee.org> + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + As a special exception, if you link this library with other files, + some of which are compiled with SDCC, to produce an executable, + this library does not by itself cause the resulting executable to + be covered by the GNU General Public License. This exception does + not however invalidate any other reasons why the executable file + might be covered by the GNU General Public License. +-------------------------------------------------------------------------*/ + +/* [1] William James Cody and W. M. Waite. _Software manual for the + elementary functions_, Englewood Cliffs, N.J.:Prentice-Hall, 1980. */ + +#include <math.h> +#include <errno.h> + +/*Constans for 24 bits or less (8 decimal digits)*/ +#define A0 -0.5527074855E+0 +#define B0 -0.6632718214E+1 +#define A(w) (A0) +#define B(w) (w+B0) + +#define C0 0.70710678118654752440 +#define C1 0.693359375 /*355.0/512.0*/ +#define C2 -2.121944400546905827679E-4 + +float logf(float x) _MATH_REENTRANT +{ +#if defined(__SDCC_mcs51) && defined(__SDCC_MODEL_SMALL) \ + && !defined(__SDCC_NOOVERLAY) + volatile +#endif + float Rz; + float f, z, w, znum, zden, xn; + int n; + + if (x<=0.0) + { + errno=EDOM; + return 0.0; + } + f=frexpf(x, &n); + znum=f-0.5; + if (f>C0) + { + znum-=0.5; + zden=(f*0.5)+0.5; + } + else + { + n--; + zden=znum*0.5+0.5; + } + z=znum/zden; + w=z*z; + + Rz=z+z*(w*A(w)/B(w)); + xn=n; + return ((xn*C2+Rz)+xn*C1); +} diff --git a/device/lib/pic16/libm/modff.c b/device/lib/pic16/libm/modff.c new file mode 100644 index 0000000..b9c23c1 --- /dev/null +++ b/device/lib/pic16/libm/modff.c @@ -0,0 +1,35 @@ +/*------------------------------------------------------------------------- + modff.c - Returns both the integer and fraction of a float. + + Copyright (C) 2001, 2002, Jesus Calvino-Fraga <jesusc At ieee.org> + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + As a special exception, if you link this library with other files, + some of which are compiled with SDCC, to produce an executable, + this library does not by itself cause the resulting executable to + be covered by the GNU General Public License. This exception does + not however invalidate any other reasons why the executable file + might be covered by the GNU General Public License. +-------------------------------------------------------------------------*/ + +#include <math.h> + +float modff(float x, float * y) +{ + *y=((int)x); + return (x-*y); +} diff --git a/device/lib/pic16/libm/powf.c b/device/lib/pic16/libm/powf.c new file mode 100644 index 0000000..54476ee --- /dev/null +++ b/device/lib/pic16/libm/powf.c @@ -0,0 +1,39 @@ +/*------------------------------------------------------------------------- + powf.c - Computes x**y where x and y are 32-bit floats. + WARNING: less that 6 digits accuracy. + + Copyright (C) 2001, 2002, Jesus Calvino-Fraga <jesusc At ieee.org> + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + As a special exception, if you link this library with other files, + some of which are compiled with SDCC, to produce an executable, + this library does not by itself cause the resulting executable to + be covered by the GNU General Public License. This exception does + not however invalidate any other reasons why the executable file + might be covered by the GNU General Public License. +-------------------------------------------------------------------------*/ + +#include <math.h> +#include <errno.h> + +float powf(float x, float y) +{ + if(y == 0.0) return 1.0; + if(y==1.0) return x; + if(x <= 0.0) return 0.0; + return expf(logf(x) * y); +} diff --git a/device/lib/pic16/libm/sincosf.c b/device/lib/pic16/libm/sincosf.c new file mode 100644 index 0000000..e480702 --- /dev/null +++ b/device/lib/pic16/libm/sincosf.c @@ -0,0 +1,94 @@ +/*------------------------------------------------------------------------- + sincosf.c - Computes sin or cos of a 32-bit float as outlined in [1] + + Copyright (C) 2001, 2002, Jesus Calvino-Fraga <jesusc At ieee.org> + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + As a special exception, if you link this library with other files, + some of which are compiled with SDCC, to produce an executable, + this library does not by itself cause the resulting executable to + be covered by the GNU General Public License. This exception does + not however invalidate any other reasons why the executable file + might be covered by the GNU General Public License. +-------------------------------------------------------------------------*/ + +/* [1] William James Cody and W. M. Waite. _Software manual for the + elementary functions_, Englewood Cliffs, N.J.:Prentice-Hall, 1980. */ + +#include <math.h> +#include <errno.h> + +#define r1 (-0.1666665668E+0) +#define r2 (0.8333025139E-2) +#define r3 (-0.1980741872E-3) +#define r4 (0.2601903036E-5) + +/* PI=C1+C2 */ +#define C1 3.140625 +#define C2 9.676535897E-4 + +/*A reasonable value for YMAX is the int part of PI*B**(t/2)=3.1416*2**(12)*/ +#define YMAX 12867.0 + +float sincosf(float x, int iscos) +{ + float y, f, r, g, XN; + int N; + char sign; + + if(iscos) + { + y=fabsf(x)+HALF_PI; + sign=0; + } + else + { + if(x<0.0) + { y=-x; sign=1; } + else + { y=x; sign=0; } + } + + if(y>YMAX) + { + errno=ERANGE; + return 0.0; + } + + /*Round y/PI to the nearest integer*/ + N=((y*iPI)+0.5); /*y is positive*/ + + /*If N is odd change sign*/ + if(N&1) sign=!sign; + + XN=N; + /*Cosine required? (is done here to keep accuracy)*/ + if(iscos) XN-=0.5; + + y=fabsf(x); + r=(int)y; + g=y-r; + f=((r-XN*C1)+g)-XN*C2; + + g=f*f; + if(g>EPS2) //Used to be if(fabsf(f)>EPS) + { + r=(((r4*g+r3)*g+r2)*g+r1)*g; + f+=f*r; + } + return (sign?-f:f); +} diff --git a/device/lib/pic16/libm/sincoshf.c b/device/lib/pic16/libm/sincoshf.c new file mode 100644 index 0000000..636960a --- /dev/null +++ b/device/lib/pic16/libm/sincoshf.c @@ -0,0 +1,97 @@ +/*------------------------------------------------------------------------- + sincoshf.c - Computes sinh or cosh of a 32-bit float as outlined in [1] + + Copyright (C) 2001, 2002, Jesus Calvino-Fraga <jesusc At ieee.org> + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + As a special exception, if you link this library with other files, + some of which are compiled with SDCC, to produce an executable, + this library does not by itself cause the resulting executable to + be covered by the GNU General Public License. This exception does + not however invalidate any other reasons why the executable file + might be covered by the GNU General Public License. +-------------------------------------------------------------------------*/ + +/* [1] William James Cody and W. M. Waite. _Software manual for the + elementary functions_, Englewood Cliffs, N.J.:Prentice-Hall, 1980. */ + +#include <math.h> +#include <errno.h> + +#define P0 -0.713793159E+1 +#define P1 -0.190333999E+0 +#define Q0 -0.428277109E+2 +#define Q1 0.100000000E+1 + +#define P(z) (P1*z+P0) +#define Q(z) (Q1*z+Q0) + +#define K1 0.69316101074218750000E+0 /* ln(v) */ +#define K2 0.24999308500451499336E+0 /* v**(-2) */ +#define K3 0.13830277879601902638E-4 /* v/2-1 */ + +//WMAX is defined as ln(XMAX)-ln(v)+0.69 +#define WMAX 44.93535952E+0 +//WBAR 0.35*(b+1) +#define WBAR 1.05 +#define YBAR 9.0 /*Works for me*/ + +float sincoshf(float x, int iscosh) +{ + float y, w, z; + char sign; + + if (x<0.0) { y=-x; sign=1; } + else { y=x; sign=0; } + + if ((y>1.0) || iscosh) + { + if(y>YBAR) + { + w=y-K1; + if (w>WMAX) + { + errno=ERANGE; + z=XMAX; + } + else + { + z=expf(w); + z+=K3*z; + } + } + else + { + z=expf(y); + w=1.0/z; + if(!iscosh) w=-w; + z=(z+w)*0.5; + } + if(sign) z=-z; + } + else + { + if (y<EPS) + z=x; + else + { + z=x*x; + z=x+x*z*P(z)/Q(z); + } + } + return z; +} diff --git a/device/lib/pic16/libm/sinf.c b/device/lib/pic16/libm/sinf.c new file mode 100644 index 0000000..b52079e --- /dev/null +++ b/device/lib/pic16/libm/sinf.c @@ -0,0 +1,37 @@ +/*------------------------------------------------------------------------- + sinf.c - Computes sin(x) where x is a 32-bit float. + + Copyright (C) 2001, 2002, Jesus Calvino-Fraga <jesusc At ieee.org> + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + As a special exception, if you link this library with other files, + some of which are compiled with SDCC, to produce an executable, + this library does not by itself cause the resulting executable to + be covered by the GNU General Public License. This exception does + not however invalidate any other reasons why the executable file + might be covered by the GNU General Public License. +-------------------------------------------------------------------------*/ + +#include <math.h> + +float sincosf(float x, int iscos); + +float sinf(float x) _MATH_REENTRANT +{ + if (x==0.0) return 0.0; + return sincosf(x, 0); +} diff --git a/device/lib/pic16/libm/sinhf.c b/device/lib/pic16/libm/sinhf.c new file mode 100644 index 0000000..39b4802 --- /dev/null +++ b/device/lib/pic16/libm/sinhf.c @@ -0,0 +1,36 @@ +/*------------------------------------------------------------------------- + sinhf.c - Computes sinh(x) where x is a 32-bit float. + + Copyright (C) 2001, 2002, Jesus Calvino-Fraga <jesusc At ieee.org> + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + As a special exception, if you link this library with other files, + some of which are compiled with SDCC, to produce an executable, + this library does not by itself cause the resulting executable to + be covered by the GNU General Public License. This exception does + not however invalidate any other reasons why the executable file + might be covered by the GNU General Public License. +-------------------------------------------------------------------------*/ + +#include <math.h> + +float sincoshf(float x, int iscosh); + +float sinhf(float x) _MATH_REENTRANT +{ + return sincoshf(x, 0); +} diff --git a/device/lib/pic16/libm/sqrtf.c b/device/lib/pic16/libm/sqrtf.c new file mode 100644 index 0000000..fa3e788 --- /dev/null +++ b/device/lib/pic16/libm/sqrtf.c @@ -0,0 +1,59 @@ +/*------------------------------------------------------------------------- + sqrtf.c - Computes square root of a 32-bit float as outlined in [1] + + Copyright (C) 2001, 2002, Jesus Calvino-Fraga <jesusc At ieee.org> + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + As a special exception, if you link this library with other files, + some of which are compiled with SDCC, to produce an executable, + this library does not by itself cause the resulting executable to + be covered by the GNU General Public License. This exception does + not however invalidate any other reasons why the executable file + might be covered by the GNU General Public License. +-------------------------------------------------------------------------*/ + +/* [1] William James Cody and W. M. Waite. _Software manual for the + elementary functions_, Englewood Cliffs, N.J.:Prentice-Hall, 1980. */ + +#include <math.h> +#include <errno.h> + +float sqrtf(float x) _MATH_REENTRANT +{ + float f, y; + int n; + + if (x==0.0) return x; + else if (x==1.0) return 1.0; + else if (x<0.0) + { + errno=EDOM; + return 0.0; + } + f=frexpf(x, &n); + y=0.41731+0.59016*f; /*Educated guess*/ + /*For a 24 bit mantisa (float), two iterations are sufficient*/ + y+=f/y; + y=ldexpf(y, -2) + f/y; /*Faster version of 0.25 * y + f/y*/ + + if (n&1) + { + y*=0.7071067812; + ++n; + } + return ldexpf(y, n/2); +} diff --git a/device/lib/pic16/libm/tancotf.c b/device/lib/pic16/libm/tancotf.c new file mode 100644 index 0000000..8dab900 --- /dev/null +++ b/device/lib/pic16/libm/tancotf.c @@ -0,0 +1,92 @@ +/*------------------------------------------------------------------------- + tancotf.c - Computes tan or cot of a 32-bit float as outlined in [1] + + Copyright (C) 2001, 2002, Jesus Calvino-Fraga <jesusc At ieee.org> + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + As a special exception, if you link this library with other files, + some of which are compiled with SDCC, to produce an executable, + this library does not by itself cause the resulting executable to + be covered by the GNU General Public License. This exception does + not however invalidate any other reasons why the executable file + might be covered by the GNU General Public License. +-------------------------------------------------------------------------*/ + +/* [1] William James Cody and W. M. Waite. _Software manual for the + elementary functions_, Englewood Cliffs, N.J.:Prentice-Hall, 1980. */ + +#include <math.h> +#include <errno.h> + +#define P0 0.100000000E+1 +#define P1 -0.958017723E-1 +#define Q0 0.100000000E+1 +#define Q1 -0.429135777E+0 +#define Q2 0.971685835E-2 + +#define C1 1.5703125 +#define C2 4.83826794897E-4 + +#define P(f,g) (P1*g*f+f) +#define Q(g) ((Q2*g+Q1)*g+Q0) + +//A reasonable choice for YMAX is the integer part of B**(t/2)*PI/2: +#define YMAX 6433.0 + +float tancotf(float x, int iscotan) +{ + float f, g, xn, xnum, xden; + int n; + + if (fabsf(x) > YMAX) + { + errno = ERANGE; + return 0.0; + } + + /*Round x*2*PI to the nearest integer*/ + n=(x*TWO_O_PI+(x>0.0?0.5:-0.5)); /*works for +-x*/ + xn=n; + + xnum=(int)x; + xden=x-xnum; + f=((xnum-xn*C1)+xden)-xn*C2; + + if (fabsf(f) < EPS) + { + xnum = f; + xden = 1.0; + } + else + { + g = f*f; + xnum = P(f,g); + xden = Q(g); + } + + if(n&1) + //xn is odd + { + if(iscotan) return (-xnum/xden); + else return (-xden/xnum); + } + else + { + if(iscotan) return (xden/xnum); + else return (xnum/xden); + } +} diff --git a/device/lib/pic16/libm/tanf.c b/device/lib/pic16/libm/tanf.c new file mode 100644 index 0000000..917378d --- /dev/null +++ b/device/lib/pic16/libm/tanf.c @@ -0,0 +1,36 @@ +/*------------------------------------------------------------------------- + tanf.c - Computes tan(x) where x is a 32-bit float. + + Copyright (C) 2001, 2002, Jesus Calvino-Fraga <jesusc At ieee.org> + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + As a special exception, if you link this library with other files, + some of which are compiled with SDCC, to produce an executable, + this library does not by itself cause the resulting executable to + be covered by the GNU General Public License. This exception does + not however invalidate any other reasons why the executable file + might be covered by the GNU General Public License. +-------------------------------------------------------------------------*/ + +#include <math.h> + +float tancotf(float x, int iscot); + +float tanf(float x) _MATH_REENTRANT +{ + return tancotf(x, 0); +} diff --git a/device/lib/pic16/libm/tanhf.c b/device/lib/pic16/libm/tanhf.c new file mode 100644 index 0000000..c72f2c3 --- /dev/null +++ b/device/lib/pic16/libm/tanhf.c @@ -0,0 +1,67 @@ +/*------------------------------------------------------------------------- + tanhf.c - Computes tanh(x) where x is a 32-bit float as outlined in [1]. + + Copyright (C) 2001, 2002, Jesus Calvino-Fraga <jesusc At ieee.org> + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + As a special exception, if you link this library with other files, + some of which are compiled with SDCC, to produce an executable, + this library does not by itself cause the resulting executable to + be covered by the GNU General Public License. This exception does + not however invalidate any other reasons why the executable file + might be covered by the GNU General Public License. +-------------------------------------------------------------------------*/ + +/* [1] William James Cody and W. M. Waite. _Software manual for the + elementary functions_, Englewood Cliffs, N.J.:Prentice-Hall, 1980. */ + +#include <math.h> +#include <errno.h> + +#define P0 -0.8237728127E+0 +#define P1 -0.3831010665E-2 +#define Q0 0.2471319654E+1 +#define Q1 0.1000000000E+1 + +/* ln(3)/2 */ +#define K1 0.5493061443E+0 +/* SBIG=[ln(2)+(t+1)*ln(B)]/2 */ +#define SBIG 9.01091 + +#define P(g) ((P1*g+P0)*g) +#define Q(g) (Q1*g+Q0) + +float tanhf(float x) _MATH_REENTRANT +{ + float f, g, r; + + f=fabsf(x); + if(f>SBIG) r=1.0; + else if(f>K1) + { + r=0.5-1.0/(expf(f+f)+1.0); + r+=r; + } + else if(f<EPS) r=f; + else + { + g=f*f; + r=f+f*(P(g)/Q(g)); + } + if(x<0.0) r=-r; + return r; +} |
