This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] FT32: add support in newlib


FT32 is a new high performance 32-bit RISC core developed by FTDI for
embedded applications.

Support for FT32 has already been added to binutils, gdb and gcc.
This patch adds newlib support.

I also propose to update config.sub from the gnuconfig project.


Please can someone review it, and if appropriate approve it for commit?

The FSF have acknowledged receipt of FTDI's copyright assignment papers.

Thanks very much.

newlib/ChangeLog:
2015-09-04  James Bowman  <james.bowman@ftdichip.com>

        * Add FT32 support

--
James Bowman
FTDI Open Source Liaison


From: James Bowman <james.bowman@ftdichip.com>
Date: Fri, 4 Sep 2015 09:02:25 -0700
Subject: [PATCH] newlib FT32 support

---
 newlib/configure.host                 |   15 ++
 newlib/libc/include/machine/ieeefp.h  |    4 +
 newlib/libc/include/machine/setjmp.h  |    4 +
 newlib/libc/machine/configure.in      |    1 +
 newlib/libc/machine/ft32/Makefile.am  |   16 ++
 newlib/libc/machine/ft32/Makefile.in  |  471 +++++++++++++++++++++++++++++++++
 newlib/libc/machine/ft32/configure.in |   14 +
 newlib/libc/machine/ft32/memcpy.S     |   32 +++
 newlib/libc/machine/ft32/memset.S     |   30 +++
 newlib/libc/machine/ft32/setjmp.S     |   94 +++++++
 newlib/libc/machine/ft32/stpcmp.S     |   22 ++
 newlib/libc/machine/ft32/strcmp.S     |   22 ++
 newlib/libc/machine/ft32/strcpy.S     |   23 ++
 newlib/libc/machine/ft32/strlen.S     |   22 ++
 14 files changed, 770 insertions(+)
 create mode 100644 newlib/libc/machine/ft32/Makefile.am
 create mode 100644 newlib/libc/machine/ft32/Makefile.in
 create mode 100644 newlib/libc/machine/ft32/configure.in
 create mode 100644 newlib/libc/machine/ft32/memcpy.S
 create mode 100644 newlib/libc/machine/ft32/memset.S
 create mode 100644 newlib/libc/machine/ft32/setjmp.S
 create mode 100644 newlib/libc/machine/ft32/stpcmp.S
 create mode 100644 newlib/libc/machine/ft32/strcmp.S
 create mode 100644 newlib/libc/machine/ft32/strcpy.S
 create mode 100644 newlib/libc/machine/ft32/strlen.S

diff --git a/newlib/configure.host b/newlib/configure.host
index dac461b..1315d09 100644
--- a/newlib/configure.host
+++ b/newlib/configure.host
@@ -141,6 +141,15 @@ case "${host_cpu}" in
   frv)
 	machine_dir=frv
         ;;
+  ft32*)
+        machine_dir=ft32
+        target_optspace=yes
+        # newlib_io_float=no
+        default_newlib_io_long_long="yes"
+        newlib_cflags="-DPREFER_SIZE_OVER_SPEED -Os"
+        CFLAGS="-Os"
+        CCASFLAGS="-Os"
+        ;;
   h8300)
 	machine_dir=h8300
 	;;
@@ -426,6 +435,9 @@ case "${host}" in
   frv*)
         sys_dir=
         ;;
+  ft32*)
+        sys_dir=
+        ;;
   h8300-*-hms*)
 	sys_dir=h8300hms
 	;;
@@ -671,6 +683,9 @@ case "${host}" in
         syscall_dir=syscalls
 	default_newlib_io_long_long="yes"
         ;;
+  ft32*-*-*)
+        syscall_dir=syscalls
+        ;;
   h8300*-*-*)
 	syscall_dir=syscalls	
 	default_newlib_io_long_long="yes"
diff --git a/newlib/libc/include/machine/ieeefp.h b/newlib/libc/include/machine/ieeefp.h
index 04eea11..11ef0dd 100644
--- a/newlib/libc/include/machine/ieeefp.h
+++ b/newlib/libc/include/machine/ieeefp.h
@@ -283,6 +283,10 @@
 #define __IEEE_BIG_ENDIAN
 #endif
 
+#ifdef __FT32__
+#define __IEEE_LITTLE_ENDIAN
+#endif
+
 #ifdef __mcore__
 #define __IEEE_BIG_ENDIAN
 #endif
diff --git a/newlib/libc/include/machine/setjmp.h b/newlib/libc/include/machine/setjmp.h
index b25684d..e0bc228 100644
--- a/newlib/libc/include/machine/setjmp.h
+++ b/newlib/libc/include/machine/setjmp.h
@@ -250,6 +250,10 @@ _BEGIN_STD_C
 #define _JBLEN 10
 #endif
 
+#ifdef  __FT32__
+#define _JBLEN 27
+#endif
+
 #ifdef __iq2000__
 #define _JBLEN 32
 #endif
diff --git a/newlib/libc/machine/configure.in b/newlib/libc/machine/configure.in
index 99b739b..1499eab 100644
--- a/newlib/libc/machine/configure.in
+++ b/newlib/libc/machine/configure.in
@@ -35,6 +35,7 @@ if test -n "${machine_dir}"; then
 	epiphany) AC_CONFIG_SUBDIRS(epiphany) ;;
 	fr30) AC_CONFIG_SUBDIRS(fr30) ;;
 	frv) AC_CONFIG_SUBDIRS(frv) ;;
+	ft32) AC_CONFIG_SUBDIRS(ft32) ;;
 	h8300) AC_CONFIG_SUBDIRS(h8300) ;;
 	h8500) AC_CONFIG_SUBDIRS(h8500) ;;
 	hppa) AC_CONFIG_SUBDIRS(hppa) ;;
diff --git a/newlib/libc/machine/ft32/Makefile.am b/newlib/libc/machine/ft32/Makefile.am
new file mode 100644
index 0000000..4aa79b0
--- /dev/null
+++ b/newlib/libc/machine/ft32/Makefile.am
@@ -0,0 +1,16 @@
+## Process this file with automake to generate Makefile.in
+
+AUTOMAKE_OPTIONS = cygnus
+
+INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
+
+AM_CCASFLAGS = $(INCLUDES)
+
+noinst_LIBRARIES = lib.a
+
+lib_a_SOURCES = setjmp.S strlen.S memcpy.S strcmp.S memset.S strcpy.S
+lib_a_CCASFLAGS=$(AM_CCASFLAGS)
+lib_a_CFLAGS=$(AM_CFLAGS)
+
+ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
+CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/machine/ft32/Makefile.in b/newlib/libc/machine/ft32/Makefile.in
new file mode 100644
index 0000000..990c588
--- /dev/null
+++ b/newlib/libc/machine/ft32/Makefile.in
@@ -0,0 +1,471 @@
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+	echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+	  | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+	for am__flg in $$MAKEFLAGS; do \
+	  case $$am__flg in \
+	    *=*|--*) ;; \
+	    *n*) am__dry=yes; break;; \
+	  esac; \
+	done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
+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 = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = .
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/configure $(am__configure_deps) \
+	$(srcdir)/../../../../mkinstalldirs
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/../../../acinclude.m4 \
+	$(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+ARFLAGS = cru
+lib_a_AR = $(AR) $(ARFLAGS)
+lib_a_LIBADD =
+am_lib_a_OBJECTS = lib_a-setjmp.$(OBJEXT) lib_a-strlen.$(OBJEXT) \
+	lib_a-memcpy.$(OBJEXT) lib_a-strcmp.$(OBJEXT) \
+	lib_a-memset.$(OBJEXT) lib_a-strcpy.$(OBJEXT)
+lib_a_OBJECTS = $(am_lib_a_OBJECTS)
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp =
+am__depfiles_maybe =
+CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(lib_a_SOURCES)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+ETAGS = etags
+CTAGS = ctags
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCAS = @CCAS@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NEWLIB_CFLAGS = @NEWLIB_CFLAGS@
+NO_INCLUDE_LIST = @NO_INCLUDE_LIST@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+READELF = @READELF@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+aext = @aext@
+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 = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libm_machine_dir = @libm_machine_dir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lpfx = @lpfx@
+machine_dir = @machine_dir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+newlib_basedir = @newlib_basedir@
+oext = @oext@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sys_dir = @sys_dir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = cygnus
+INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
+AM_CCASFLAGS = $(INCLUDES)
+noinst_LIBRARIES = lib.a
+lib_a_SOURCES = setjmp.S strlen.S memcpy.S strcmp.S memset.S strcpy.S
+lib_a_CCASFLAGS = $(AM_CCASFLAGS)
+lib_a_CFLAGS = $(AM_CFLAGS)
+ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
+CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .S .o .obj
+am--refresh: Makefile
+	@:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --cygnus'; \
+	      $(am__cd) $(srcdir) && $(AUTOMAKE) --cygnus \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --cygnus Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    echo ' $(SHELL) ./config.status'; \
+	    $(SHELL) ./config.status;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	$(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+clean-noinstLIBRARIES:
+	-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES) $(EXTRA_lib_a_DEPENDENCIES)
+	-rm -f lib.a
+	$(lib_a_AR) lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
+	$(RANLIB) lib.a
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+.S.o:
+	$(CPPASCOMPILE) -c -o $@ $<
+
+.S.obj:
+	$(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+lib_a-setjmp.o: setjmp.S
+	$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-setjmp.o `test -f 'setjmp.S' || echo '$(srcdir)/'`setjmp.S
+
+lib_a-setjmp.obj: setjmp.S
+	$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-setjmp.obj `if test -f 'setjmp.S'; then $(CYGPATH_W) 'setjmp.S'; else $(CYGPATH_W) '$(srcdir)/setjmp.S'; fi`
+
+lib_a-strlen.o: strlen.S
+	$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strlen.o `test -f 'strlen.S' || echo '$(srcdir)/'`strlen.S
+
+lib_a-strlen.obj: strlen.S
+	$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strlen.obj `if test -f 'strlen.S'; then $(CYGPATH_W) 'strlen.S'; else $(CYGPATH_W) '$(srcdir)/strlen.S'; fi`
+
+lib_a-memcpy.o: memcpy.S
+	$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memcpy.o `test -f 'memcpy.S' || echo '$(srcdir)/'`memcpy.S
+
+lib_a-memcpy.obj: memcpy.S
+	$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memcpy.obj `if test -f 'memcpy.S'; then $(CYGPATH_W) 'memcpy.S'; else $(CYGPATH_W) '$(srcdir)/memcpy.S'; fi`
+
+lib_a-strcmp.o: strcmp.S
+	$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strcmp.o `test -f 'strcmp.S' || echo '$(srcdir)/'`strcmp.S
+
+lib_a-strcmp.obj: strcmp.S
+	$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strcmp.obj `if test -f 'strcmp.S'; then $(CYGPATH_W) 'strcmp.S'; else $(CYGPATH_W) '$(srcdir)/strcmp.S'; fi`
+
+lib_a-memset.o: memset.S
+	$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memset.o `test -f 'memset.S' || echo '$(srcdir)/'`memset.S
+
+lib_a-memset.obj: memset.S
+	$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-memset.obj `if test -f 'memset.S'; then $(CYGPATH_W) 'memset.S'; else $(CYGPATH_W) '$(srcdir)/memset.S'; fi`
+
+lib_a-strcpy.o: strcpy.S
+	$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strcpy.o `test -f 'strcpy.S' || echo '$(srcdir)/'`strcpy.S
+
+lib_a-strcpy.obj: strcpy.S
+	$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-strcpy.obj `if test -f 'strcpy.S'; then $(CYGPATH_W) 'strcpy.S'; else $(CYGPATH_W) '$(srcdir)/strcpy.S'; fi`
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	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
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	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"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+check-am:
+check: check-am
+all-am: Makefile $(LIBRARIES)
+installdirs:
+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-noinstLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-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-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 $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -rf $(top_srcdir)/autom4te.cache
+	-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:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
+	clean-generic clean-noinstLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-tags 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-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 uninstall \
+	uninstall-am
+
+
+# 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/newlib/libc/machine/ft32/configure.in b/newlib/libc/machine/ft32/configure.in
new file mode 100644
index 0000000..1a19430
--- /dev/null
+++ b/newlib/libc/machine/ft32/configure.in
@@ -0,0 +1,14 @@
+dnl This is the newlib/libc/machine/arm configure.in file.
+dnl Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.59)
+AC_INIT([newlib],[NEWLIB_VERSION])
+AC_CONFIG_SRCDIR([Makefile.am])
+
+dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
+AC_CONFIG_AUX_DIR(../../../..)
+
+NEWLIB_CONFIGURE(../../..)
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/newlib/libc/machine/ft32/memcpy.S b/newlib/libc/machine/ft32/memcpy.S
new file mode 100644
index 0000000..03b01a6
--- /dev/null
+++ b/newlib/libc/machine/ft32/memcpy.S
@@ -0,0 +1,32 @@
+/* A memcpy.c for FT32
+   Copyright (C) 2014 FTDI (support@ftdichip.com)
+
+   The authors hereby grant permission to use, copy, modify, distribute,
+   and license this software and its documentation for any purpose, provided
+   that existing copyright notices are retained in all copies and that this
+   notice is included verbatim in any distributions. No written agreement,
+   license, or royalty fee is required for any of the authorized uses.
+   Modifications to this software may be copyrighted by their authors
+   and need not follow the licensing terms described here, provided that
+   the new terms are clearly indicated on the first page of each file where
+   they apply.  */
+
+	.text
+	.global	memcpy
+	.type	memcpy,@function
+memcpy:
+	ldk    $r3,32764
+1:
+	cmp    $r2,$r3
+	jmpc   lte,2f
+	memcpy.b $r0,$r1,$r3
+	add    $r0,$r0,$r3
+	add    $r1,$r1,$r3
+	sub    $r2,$r2,$r3
+	jmp    1b
+2:
+	memcpy.b $r0,$r1,$r2
+	return
+.Lend2:
+	.size	memcpy,.Lend2-memcpy
+
diff --git a/newlib/libc/machine/ft32/memset.S b/newlib/libc/machine/ft32/memset.S
new file mode 100644
index 0000000..07b733f
--- /dev/null
+++ b/newlib/libc/machine/ft32/memset.S
@@ -0,0 +1,30 @@
+/* A memset.c for FT32
+   Copyright (C) 2014 FTDI (support@ftdichip.com)
+
+   The authors hereby grant permission to use, copy, modify, distribute,
+   and license this software and its documentation for any purpose, provided
+   that existing copyright notices are retained in all copies and that this
+   notice is included verbatim in any distributions. No written agreement,
+   license, or royalty fee is required for any of the authorized uses.
+   Modifications to this software may be copyrighted by their authors
+   and need not follow the licensing terms described here, provided that
+   the new terms are clearly indicated on the first page of each file where
+   they apply.  */
+
+	.text
+	.global	memset
+	.type	memset,@function
+memset:
+	ldk    $r3,32764
+1:
+	cmp    $r2,$r3
+	jmpc   lte,2f
+	memset.b $r0,$r1,$r3
+	add    $r0,$r0,$r3
+	sub    $r2,$r2,$r3
+	jmp    1b
+2:
+	memset.b $r0,$r1,$r2
+	return
+.Lend2:
+	.size	memset,.Lend2-memset
diff --git a/newlib/libc/machine/ft32/setjmp.S b/newlib/libc/machine/ft32/setjmp.S
new file mode 100644
index 0000000..4fcdfef
--- /dev/null
+++ b/newlib/libc/machine/ft32/setjmp.S
@@ -0,0 +1,94 @@
+/* A setjmp.c for FT32
+   Copyright (C) 2014 FTDI (support@ftdichip.com)
+
+   The authors hereby grant permission to use, copy, modify, distribute,
+   and license this software and its documentation for any purpose, provided
+   that existing copyright notices are retained in all copies and that this
+   notice is included verbatim in any distributions. No written agreement,
+   license, or royalty fee is required for any of the authorized uses.
+   Modifications to this software may be copyrighted by their authors
+   and need not follow the licensing terms described here, provided that
+   the new terms are clearly indicated on the first page of each file where
+   they apply.  */
+
+# setjmp/longjmp for FT32.
+# Total jumpbuf size is 108 bytes, or 27 words.
+#	
+
+	.text
+	.global	setjmp
+	.type	setjmp,@function
+setjmp:
+	pop.l   $r5           # return address in $r5
+	sti.l   $r0,0,$r5
+	sti.l   $r0,4,$r6
+	sti.l   $r0,8,$r7
+	sti.l   $r0,12,$r8
+	sti.l   $r0,16,$r9
+	sti.l   $r0,20,$r10
+	sti.l   $r0,24,$r11
+	sti.l   $r0,28,$r12
+	sti.l   $r0,32,$r13
+	sti.l   $r0,36,$r14
+	sti.l   $r0,40,$r15
+	sti.l   $r0,44,$r16
+	sti.l   $r0,48,$r17
+	sti.l   $r0,52,$r18
+	sti.l   $r0,56,$r19
+	sti.l   $r0,60,$r20
+	sti.l   $r0,64,$r21
+	sti.l   $r0,68,$r22
+	sti.l   $r0,72,$r23
+	sti.l   $r0,76,$r24
+	sti.l   $r0,80,$r25
+	sti.l   $r0,84,$r26
+	sti.l   $r0,88,$r27
+	sti.l   $r0,92,$r28
+	sti.l   $r0,96,$r29
+	sti.l   $r0,100,$r30
+	sti.l   $r0,104,$r31
+	ldk.l   $r0,0
+	jmpi    $r5
+
+.Lend1:
+	.size	setjmp,.Lend1-setjmp
+
+	.global	longjmp
+	.type	longjmp,@function
+longjmp:
+	cmp.l   $r1,0
+	jmpc    nz,.nonz
+	ldk.l   $r1,1
+.nonz:
+	ldi.l   $r5,$r0,0
+	ldi.l   $r6,$r0,4
+	ldi.l   $r7,$r0,8
+	ldi.l   $r8,$r0,12
+	ldi.l   $r9,$r0,16
+	ldi.l   $r10,$r0,20
+	ldi.l   $r11,$r0,24
+	ldi.l   $r12,$r0,28
+	ldi.l   $r13,$r0,32
+	ldi.l   $r14,$r0,36
+	ldi.l   $r15,$r0,40
+	ldi.l   $r16,$r0,44
+	ldi.l   $r17,$r0,48
+	ldi.l   $r18,$r0,52
+	ldi.l   $r19,$r0,56
+	ldi.l   $r20,$r0,60
+	ldi.l   $r21,$r0,64
+	ldi.l   $r22,$r0,68
+	ldi.l   $r23,$r0,72
+	ldi.l   $r24,$r0,76
+	ldi.l   $r25,$r0,80
+	ldi.l   $r26,$r0,84
+	ldi.l   $r27,$r0,88
+	ldi.l   $r28,$r0,92
+	ldi.l   $r29,$r0,96
+	ldi.l   $r30,$r0,100
+	ldi.l   $r31,$r0,104
+	move.l  $r0,$r1
+	jmpi    $r5
+
+.Lend2:
+	.size	longjmp,.Lend2-longjmp
diff --git a/newlib/libc/machine/ft32/stpcmp.S b/newlib/libc/machine/ft32/stpcmp.S
new file mode 100644
index 0000000..1522656
--- /dev/null
+++ b/newlib/libc/machine/ft32/stpcmp.S
@@ -0,0 +1,22 @@
+/* A strlen.c for FT32
+   Copyright (C) 2014 FTDI (support@ftdichip.com)
+
+   The authors hereby grant permission to use, copy, modify, distribute,
+   and license this software and its documentation for any purpose, provided
+   that existing copyright notices are retained in all copies and that this
+   notice is included verbatim in any distributions. No written agreement,
+   license, or royalty fee is required for any of the authorized uses.
+   Modifications to this software may be copyrighted by their authors
+   and need not follow the licensing terms described here, provided that
+   the new terms are clearly indicated on the first page of each file where
+   they apply.  */
+
+	.text
+	.global	strlen
+	.type	strlen,@function
+strlen:
+	strlen.b $r0,$r0
+	return
+.Lend2:
+	.size	strlen,.Lend2-strlen
+
diff --git a/newlib/libc/machine/ft32/strcmp.S b/newlib/libc/machine/ft32/strcmp.S
new file mode 100644
index 0000000..9d64dfa
--- /dev/null
+++ b/newlib/libc/machine/ft32/strcmp.S
@@ -0,0 +1,22 @@
+/* A strcmp.c for FT32
+   Copyright (C) 2014 FTDI (support@ftdichip.com)
+
+   The authors hereby grant permission to use, copy, modify, distribute,
+   and license this software and its documentation for any purpose, provided
+   that existing copyright notices are retained in all copies and that this
+   notice is included verbatim in any distributions. No written agreement,
+   license, or royalty fee is required for any of the authorized uses.
+   Modifications to this software may be copyrighted by their authors
+   and need not follow the licensing terms described here, provided that
+   the new terms are clearly indicated on the first page of each file where
+   they apply.  */
+
+	.text
+	.global	strcmp
+	.type	strcmp,@function
+strcmp:
+	strcmp.b $r0,$r0,$r1
+	return
+.Lend2:
+	.size	strcmp,.Lend2-strcmp
+
diff --git a/newlib/libc/machine/ft32/strcpy.S b/newlib/libc/machine/ft32/strcpy.S
new file mode 100644
index 0000000..a431ef6
--- /dev/null
+++ b/newlib/libc/machine/ft32/strcpy.S
@@ -0,0 +1,23 @@
+/* A strcpy.c for FT32
+   Copyright (C) 2014 FTDI (support@ftdichip.com)
+
+   The authors hereby grant permission to use, copy, modify, distribute,
+   and license this software and its documentation for any purpose, provided
+   that existing copyright notices are retained in all copies and that this
+   notice is included verbatim in any distributions. No written agreement,
+   license, or royalty fee is required for any of the authorized uses.
+   Modifications to this software may be copyrighted by their authors
+   and need not follow the licensing terms described here, provided that
+   the new terms are clearly indicated on the first page of each file where
+   they apply.  */
+
+	.text
+	.global	strcpy
+	.type	strcpy,@function
+strcpy:
+	move.l   $r5,$r0
+	stpcpy.b $r5,$r1
+	return
+.Lend2:
+	.size	strcpy,.Lend2-strcpy
+
diff --git a/newlib/libc/machine/ft32/strlen.S b/newlib/libc/machine/ft32/strlen.S
new file mode 100644
index 0000000..1522656
--- /dev/null
+++ b/newlib/libc/machine/ft32/strlen.S
@@ -0,0 +1,22 @@
+/* A strlen.c for FT32
+   Copyright (C) 2014 FTDI (support@ftdichip.com)
+
+   The authors hereby grant permission to use, copy, modify, distribute,
+   and license this software and its documentation for any purpose, provided
+   that existing copyright notices are retained in all copies and that this
+   notice is included verbatim in any distributions. No written agreement,
+   license, or royalty fee is required for any of the authorized uses.
+   Modifications to this software may be copyrighted by their authors
+   and need not follow the licensing terms described here, provided that
+   the new terms are clearly indicated on the first page of each file where
+   they apply.  */
+
+	.text
+	.global	strlen
+	.type	strlen,@function
+strlen:
+	strlen.b $r0,$r0
+	return
+.Lend2:
+	.size	strlen,.Lend2-strlen
+
-- 
1.7.9.5


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]