* configure.host: Add libm nds32 machine directory.
* libm/machine/configure: Regenerated. * libm/machine/configure.in: Add nds32 AC_CONFIG. * libm/machine/nds32/Makefile.am: New file. * libm/machine/nds32/Makefile.in: Generated. * libm/machine/nds32/aclocal.m4: Generated. * libm/machine/nds32/configure: Generated. * libm/machine/nds32/configure.in: New file. * libm/machine/nds32/w_sqrt.S: New file. * libm/machine/nds32/wf_sqrt.S: New file.
This commit is contained in:
		| @@ -1,3 +1,16 @@ | |||||||
|  | 2014-12-15  Nick Hung  <nick@andestech.com> | ||||||
|  |  | ||||||
|  | 	* configure.host: Add libm nds32 machine directory. | ||||||
|  | 	* libm/machine/configure: Regenerated. | ||||||
|  | 	* libm/machine/configure.in: Add nds32 AC_CONFIG. | ||||||
|  | 	* libm/machine/nds32/Makefile.am: New file. | ||||||
|  | 	* libm/machine/nds32/Makefile.in: Generated. | ||||||
|  | 	* libm/machine/nds32/aclocal.m4: Generated. | ||||||
|  | 	* libm/machine/nds32/configure: Generated. | ||||||
|  | 	* libm/machine/nds32/configure.in: New file. | ||||||
|  | 	* libm/machine/nds32/w_sqrt.S: New file. | ||||||
|  | 	* libm/machine/nds32/wf_sqrt.S: New file. | ||||||
|  |  | ||||||
| 2014-12-15  Corinna Vinschen  <vinschen@redhat.com> | 2014-12-15  Corinna Vinschen  <vinschen@redhat.com> | ||||||
|  |  | ||||||
| 	* libc/include/stdlib.h: Include sys/cdefs.h to avoid undefined | 	* libc/include/stdlib.h: Include sys/cdefs.h to avoid undefined | ||||||
|   | |||||||
| @@ -238,9 +238,9 @@ case "${host_cpu}" in | |||||||
| 	;; | 	;; | ||||||
|   nds32*) |   nds32*) | ||||||
| 	machine_dir=nds32 | 	machine_dir=nds32 | ||||||
| 	newlib_cflags="${newlib_cflags} -DPREFER_SIZE_OVER_SPEED " | 	libm_machine_dir=nds32 | ||||||
| 	newlib_cflags="${newlib_cflags} -DSMALL_MEMORY " |  | ||||||
| 	newlib_cflags="${newlib_cflags} -ffunction-sections -fdata-sections" | 	newlib_cflags="${newlib_cflags} -ffunction-sections -fdata-sections" | ||||||
|  | 	newlib_cflags="${newlib_cflags} -DHAVE_RENAME" | ||||||
| 	;; | 	;; | ||||||
|   nios2*) |   nios2*) | ||||||
| 	machine_dir=nios2 | 	machine_dir=nios2 | ||||||
|   | |||||||
							
								
								
									
										7
									
								
								newlib/libm/machine/configure
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								newlib/libm/machine/configure
									
									
									
									
										vendored
									
									
								
							| @@ -788,6 +788,7 @@ CPP' | |||||||
| ac_subdirs_all='aarch64 | ac_subdirs_all='aarch64 | ||||||
| arm | arm | ||||||
| i386 | i386 | ||||||
|  | nds32 | ||||||
| spu' | spu' | ||||||
|  |  | ||||||
| # Initialize some variables set by options. | # Initialize some variables set by options. | ||||||
| @@ -11433,7 +11434,7 @@ else | |||||||
|   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 |   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 | ||||||
|   lt_status=$lt_dlunknown |   lt_status=$lt_dlunknown | ||||||
|   cat > conftest.$ac_ext <<_LT_EOF |   cat > conftest.$ac_ext <<_LT_EOF | ||||||
| #line 11436 "configure" | #line 11437 "configure" | ||||||
| #include "confdefs.h" | #include "confdefs.h" | ||||||
|  |  | ||||||
| #if HAVE_DLFCN_H | #if HAVE_DLFCN_H | ||||||
| @@ -11539,7 +11540,7 @@ else | |||||||
|   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 |   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 | ||||||
|   lt_status=$lt_dlunknown |   lt_status=$lt_dlunknown | ||||||
|   cat > conftest.$ac_ext <<_LT_EOF |   cat > conftest.$ac_ext <<_LT_EOF | ||||||
| #line 11542 "configure" | #line 11543 "configure" | ||||||
| #include "confdefs.h" | #include "confdefs.h" | ||||||
|  |  | ||||||
| #if HAVE_DLFCN_H | #if HAVE_DLFCN_H | ||||||
| @@ -11789,6 +11790,8 @@ subdirs="$subdirs aarch64" | |||||||
| 	arm) subdirs="$subdirs arm" | 	arm) subdirs="$subdirs arm" | ||||||
|  ;; |  ;; | ||||||
| 	i386) subdirs="$subdirs i386" | 	i386) subdirs="$subdirs i386" | ||||||
|  |  ;; | ||||||
|  | 	nds32) subdirs="$subdirs nds32" | ||||||
|  ;; |  ;; | ||||||
| 	spu) subdirs="$subdirs spu" | 	spu) subdirs="$subdirs spu" | ||||||
|  ;; |  ;; | ||||||
|   | |||||||
| @@ -28,6 +28,7 @@ if test -n "${libm_machine_dir}"; then | |||||||
| 	aarch64) AC_CONFIG_SUBDIRS(aarch64) ;; | 	aarch64) AC_CONFIG_SUBDIRS(aarch64) ;; | ||||||
| 	arm) AC_CONFIG_SUBDIRS(arm) ;; | 	arm) AC_CONFIG_SUBDIRS(arm) ;; | ||||||
| 	i386) AC_CONFIG_SUBDIRS(i386) ;; | 	i386) AC_CONFIG_SUBDIRS(i386) ;; | ||||||
|  | 	nds32) AC_CONFIG_SUBDIRS(nds32) ;; | ||||||
| 	spu) AC_CONFIG_SUBDIRS(spu) ;; | 	spu) AC_CONFIG_SUBDIRS(spu) ;; | ||||||
|   esac; |   esac; | ||||||
|   if test "${use_libtool}" = "yes"; then |   if test "${use_libtool}" = "yes"; then | ||||||
|   | |||||||
							
								
								
									
										30
									
								
								newlib/libm/machine/nds32/Makefile.am
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								newlib/libm/machine/nds32/Makefile.am
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,30 @@ | |||||||
|  | ## Process this file with automake to generate Makefile.in | ||||||
|  |  | ||||||
|  | AUTOMAKE_OPTIONS = cygnus | ||||||
|  |  | ||||||
|  | INCLUDES = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \ | ||||||
|  | 	$(CROSS_CFLAGS) $(TARGET_CFLAGS) | ||||||
|  |  | ||||||
|  | if HAS_NDS32_FPU_SP_FALSE | ||||||
|  | GPR_SOURCES = | ||||||
|  | else | ||||||
|  | FPU_SP_SOURCES = wf_sqrt.S | ||||||
|  | endif | ||||||
|  |  | ||||||
|  | if HAS_NDS32_FPU_DP_FALSE | ||||||
|  | else | ||||||
|  | FPU_DP_SOURCES = w_sqrt.S | ||||||
|  | endif | ||||||
|  |  | ||||||
|  | LIB_SOURCES = $(GPR_SOURCES) $(FPU_SP_SOURCES) $(FPU_DP_SOURCES) | ||||||
|  |  | ||||||
|  | noinst_LIBRARIES = lib.a | ||||||
|  | lib_a_SOURCES = $(LIB_SOURCES) | ||||||
|  | lib_a_CFLAGS = $(AM_CFLAGS) | ||||||
|  | lib_a_CCASFLAGS = $(AM_CCASFLAGS) | ||||||
|  | noinst_DATA = | ||||||
|  |  | ||||||
|  | include $(srcdir)/../../../Makefile.shared | ||||||
|  |  | ||||||
|  | ACLOCAL_AMFLAGS = -I ../../.. -I ../../../.. | ||||||
|  | CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host | ||||||
							
								
								
									
										469
									
								
								newlib/libm/machine/nds32/Makefile.in
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										469
									
								
								newlib/libm/machine/nds32/Makefile.in
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,469 @@ | |||||||
|  | # 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@ | ||||||
|  | DIST_COMMON = $(srcdir)/../../../Makefile.shared $(srcdir)/Makefile.in \ | ||||||
|  | 	$(srcdir)/Makefile.am $(top_srcdir)/configure \ | ||||||
|  | 	$(am__configure_deps) $(srcdir)/../../../../mkinstalldirs | ||||||
|  | subdir = . | ||||||
|  | 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__objects_1 = | ||||||
|  | @HAS_NDS32_FPU_SP_TRUE@am__objects_2 = lib_a-wf_sqrt.$(OBJEXT) | ||||||
|  | @HAS_NDS32_FPU_DP_TRUE@am__objects_3 = lib_a-w_sqrt.$(OBJEXT) | ||||||
|  | am__objects_4 = $(am__objects_1) $(am__objects_2) $(am__objects_3) | ||||||
|  | am_lib_a_OBJECTS = $(am__objects_4) | ||||||
|  | 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 | ||||||
|  | DATA = $(noinst_DATA) | ||||||
|  | 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@ | ||||||
|  | CFLAGS = @CFLAGS@ | ||||||
|  | CPPFLAGS = @CPPFLAGS@ | ||||||
|  | CYGPATH_W = @CYGPATH_W@ | ||||||
|  | DEFS = @DEFS@ | ||||||
|  | DEPDIR = @DEPDIR@ | ||||||
|  | ECHO_C = @ECHO_C@ | ||||||
|  | ECHO_N = @ECHO_N@ | ||||||
|  | ECHO_T = @ECHO_T@ | ||||||
|  | EXEEXT = @EXEEXT@ | ||||||
|  | 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_URL = @PACKAGE_URL@ | ||||||
|  | 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@ | ||||||
|  | ac_ct_CC = @ac_ct_CC@ | ||||||
|  | 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 = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \ | ||||||
|  | 	$(CROSS_CFLAGS) $(TARGET_CFLAGS) | ||||||
|  |  | ||||||
|  | @HAS_NDS32_FPU_SP_FALSE@GPR_SOURCES = | ||||||
|  | @HAS_NDS32_FPU_SP_TRUE@FPU_SP_SOURCES = wf_sqrt.S | ||||||
|  | @HAS_NDS32_FPU_DP_TRUE@FPU_DP_SOURCES = w_sqrt.S | ||||||
|  | LIB_SOURCES = $(GPR_SOURCES) $(FPU_SP_SOURCES) $(FPU_DP_SOURCES) | ||||||
|  | noinst_LIBRARIES = lib.a | ||||||
|  | lib_a_SOURCES = $(LIB_SOURCES) | ||||||
|  | lib_a_CFLAGS = $(AM_CFLAGS) | ||||||
|  | lib_a_CCASFLAGS = $(AM_CCASFLAGS) | ||||||
|  | noinst_DATA = | ||||||
|  | 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 $(srcdir)/../../../Makefile.shared $(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; | ||||||
|  | $(srcdir)/../../../Makefile.shared: | ||||||
|  |  | ||||||
|  | $(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-wf_sqrt.o: wf_sqrt.S | ||||||
|  | 	$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-wf_sqrt.o `test -f 'wf_sqrt.S' || echo '$(srcdir)/'`wf_sqrt.S | ||||||
|  |  | ||||||
|  | lib_a-wf_sqrt.obj: wf_sqrt.S | ||||||
|  | 	$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-wf_sqrt.obj `if test -f 'wf_sqrt.S'; then $(CYGPATH_W) 'wf_sqrt.S'; else $(CYGPATH_W) '$(srcdir)/wf_sqrt.S'; fi` | ||||||
|  |  | ||||||
|  | lib_a-w_sqrt.o: w_sqrt.S | ||||||
|  | 	$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-w_sqrt.o `test -f 'w_sqrt.S' || echo '$(srcdir)/'`w_sqrt.S | ||||||
|  |  | ||||||
|  | lib_a-w_sqrt.obj: w_sqrt.S | ||||||
|  | 	$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CCASFLAGS) $(CCASFLAGS) -c -o lib_a-w_sqrt.obj `if test -f 'w_sqrt.S'; then $(CYGPATH_W) 'w_sqrt.S'; else $(CYGPATH_W) '$(srcdir)/w_sqrt.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) $(DATA) | ||||||
|  | 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 | ||||||
|  |  | ||||||
|  | objectlist.awk.in: $(noinst_LTLIBRARIES) | ||||||
|  | 	-rm -f objectlist.awk.in | ||||||
|  | 	for i in `ls *.lo` ; \ | ||||||
|  | 	do \ | ||||||
|  | 	  echo $$i `pwd`/$$i >> objectlist.awk.in ; \ | ||||||
|  | 	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: | ||||||
							
								
								
									
										1012
									
								
								newlib/libm/machine/nds32/aclocal.m4
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1012
									
								
								newlib/libm/machine/nds32/aclocal.m4
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										5844
									
								
								newlib/libm/machine/nds32/configure
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										5844
									
								
								newlib/libm/machine/nds32/configure
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										35
									
								
								newlib/libm/machine/nds32/configure.in
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								newlib/libm/machine/nds32/configure.in
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,35 @@ | |||||||
|  | dnl This is the newlib/libm/machine/nds32 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(../../..) | ||||||
|  |  | ||||||
|  |  | ||||||
|  | dnl Use builtin macro to detect if FPU extension support is on. | ||||||
|  | AC_NO_EXECUTABLES | ||||||
|  | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( | ||||||
|  | [[#if (__NDS32_EXT_FPU_SP__) | ||||||
|  | warning: Has nds32 FPU SP extension support | ||||||
|  | #endif | ||||||
|  | ]])], | ||||||
|  |                   [has_nds32_fpu_sp="no"], | ||||||
|  | 		  [has_nds32_fpu_sp="yes"]) | ||||||
|  | AM_CONDITIONAL(HAS_NDS32_FPU_SP, test "$has_nds32_fpu_sp" = "yes") | ||||||
|  |  | ||||||
|  | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( | ||||||
|  | [[#if (__NDS32_EXT_FPU_DP__) | ||||||
|  | warning: Has nds32 FPU DP extension support | ||||||
|  | #endif | ||||||
|  | ]])], | ||||||
|  |                   [has_nds32_fpu_dp="no"], | ||||||
|  | 		  [has_nds32_fpu_dp="yes"]) | ||||||
|  | AM_CONDITIONAL(HAS_NDS32_FPU_DP, test "$has_nds32_fpu_dp" = "yes") | ||||||
|  |  | ||||||
|  | AC_CONFIG_FILES([Makefile]) | ||||||
|  | AC_OUTPUT | ||||||
							
								
								
									
										68
									
								
								newlib/libm/machine/nds32/w_sqrt.S
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										68
									
								
								newlib/libm/machine/nds32/w_sqrt.S
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,68 @@ | |||||||
|  | /* | ||||||
|  | Copyright (c) 2013-2014 Andes Technology Corporation. | ||||||
|  | All rights reserved. | ||||||
|  |  | ||||||
|  | Redistribution and use in source and binary forms, with or without | ||||||
|  | modification, are permitted provided that the following conditions are met: | ||||||
|  |  | ||||||
|  |     Redistributions of source code must retain the above copyright | ||||||
|  |     notice, this list of conditions and the following disclaimer. | ||||||
|  |  | ||||||
|  |     Redistributions in binary form must reproduce the above copyright | ||||||
|  |     notice, this list of conditions and the following disclaimer in the | ||||||
|  |     documentation and/or other materials provided with the distribution. | ||||||
|  |  | ||||||
|  |     The name of the company may not be used to endorse or promote | ||||||
|  |     products derived from this software without specific prior written | ||||||
|  |     permission. | ||||||
|  |  | ||||||
|  | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||||
|  | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||||
|  | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||||||
|  | DISCLAIMED.  IN NO EVENT SHALL RED HAT INCORPORATED BE LIABLE FOR ANY | ||||||
|  | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||||||
|  | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||||||
|  | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||||||
|  | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||||||
|  | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||||||
|  | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||||
|  | */ | ||||||
|  | 	.text | ||||||
|  | 	.align	1 | ||||||
|  | 	.global  sqrt | ||||||
|  | 	.type    sqrt, @function | ||||||
|  | sqrt: | ||||||
|  | 	/* The input argument is supposed to be stored in $fd0. | ||||||
|  | 	   The return value is supposed to be stored in $fd0 either.  */ | ||||||
|  |  | ||||||
|  | 	/* Clear the IEEE cumulative exceptions flags. ($fpcsr.b[6:2])  */ | ||||||
|  | 	FMFCSR  $r0 | ||||||
|  | 	bitci   $r0, $r0, #0b1111100 | ||||||
|  | 	FMTCSR	$r0 | ||||||
|  |  | ||||||
|  | 	fsqrtd   $fd0, $fd0 | ||||||
|  |  | ||||||
|  | 	/* Check the IEEE cumulative exceptions flags.  */ | ||||||
|  | 	FMFCSR	$r0 | ||||||
|  | 	bmski33 $r0, #2		/* Is $fpcsr.IVO('b2) set ?  */ | ||||||
|  | 	bnez	$r0, .L_EDOM	/* Set errno as EDOM.  */ | ||||||
|  |  | ||||||
|  | 	bmski33 $r0, #4		/* Is $fpcsr.OVF('b4) set ?  */ | ||||||
|  | 	bnez	$r0, .L_ERANGE	/* Set errno as ERANGE.  */ | ||||||
|  |  | ||||||
|  | 	bmski33 $r0, #5		/* Is $fpcsr.UDF('b5) set ?  */ | ||||||
|  | 	bnez	$r0, .L_ERANGE	/* Set errno as ERANGE.  */ | ||||||
|  |  | ||||||
|  | 	/* No error at all.  Just ret.  */ | ||||||
|  | 	ret | ||||||
|  |  | ||||||
|  | .L_EDOM: | ||||||
|  | 	movi	$r0, #33	/* EDOM: Math arg out of domain of func.  */ | ||||||
|  | 	j	.L_Set_errno | ||||||
|  | .L_ERANGE: | ||||||
|  | 	movi	$r0, #34	/* ERANGE: Math result not representable.  */ | ||||||
|  | .L_Set_errno: | ||||||
|  | 	l.w	$r15, _impure_ptr | ||||||
|  | 	swi	$r0, [$r15]	/* Set errno.  */ | ||||||
|  | 	ret | ||||||
|  | 	.size sqrt, .-sqrt | ||||||
							
								
								
									
										68
									
								
								newlib/libm/machine/nds32/wf_sqrt.S
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										68
									
								
								newlib/libm/machine/nds32/wf_sqrt.S
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,68 @@ | |||||||
|  | /* | ||||||
|  | Copyright (c) 2013-2014 Andes Technology Corporation. | ||||||
|  | All rights reserved. | ||||||
|  |  | ||||||
|  | Redistribution and use in source and binary forms, with or without | ||||||
|  | modification, are permitted provided that the following conditions are met: | ||||||
|  |  | ||||||
|  |     Redistributions of source code must retain the above copyright | ||||||
|  |     notice, this list of conditions and the following disclaimer. | ||||||
|  |  | ||||||
|  |     Redistributions in binary form must reproduce the above copyright | ||||||
|  |     notice, this list of conditions and the following disclaimer in the | ||||||
|  |     documentation and/or other materials provided with the distribution. | ||||||
|  |  | ||||||
|  |     The name of the company may not be used to endorse or promote | ||||||
|  |     products derived from this software without specific prior written | ||||||
|  |     permission. | ||||||
|  |  | ||||||
|  | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||||||
|  | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||||||
|  | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||||||
|  | DISCLAIMED.  IN NO EVENT SHALL RED HAT INCORPORATED BE LIABLE FOR ANY | ||||||
|  | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||||||
|  | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||||||
|  | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||||||
|  | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||||||
|  | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||||||
|  | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||||
|  | */ | ||||||
|  | 	.text | ||||||
|  | 	.align	1 | ||||||
|  | 	.global  sqrtf | ||||||
|  | 	.type    sqrtf, @function | ||||||
|  | sqrtf: | ||||||
|  | 	/* The input argument is supposed to be stored in $fs0. | ||||||
|  | 	   The return value is supposed to be stored in $fs0 either.  */ | ||||||
|  |  | ||||||
|  | 	/* Clear the IEEE cumulative exceptions flags. ($fpcsr.b[6:2])  */ | ||||||
|  | 	FMFCSR  $r0 | ||||||
|  | 	bitci   $r0, $r0, #0b1111100 | ||||||
|  | 	FMTCSR	$r0 | ||||||
|  |  | ||||||
|  | 	fsqrts  $fs0, $fs0 | ||||||
|  |  | ||||||
|  | 	/* Check the IEEE cumulative exceptions flags.  */ | ||||||
|  | 	FMFCSR	$r5 | ||||||
|  | 	bmski33 $r5, #2		/* Is $fpcsr.IVO('b2) set ?  */ | ||||||
|  | 	bnez	$r5, .L_EDOM	/* Set errno as EDOM.  */ | ||||||
|  |  | ||||||
|  | 	bmski33 $r5, #4		/* Is $fpcsr.OVF('b4) set ?  */ | ||||||
|  | 	bnez	$r5, .L_ERANGE	/* Set errno as ERANGE.  */ | ||||||
|  |  | ||||||
|  | 	bmski33 $r5, #5		/* Is $fpcsr.UDF('b5) set ?  */ | ||||||
|  | 	bnez	$r5, .L_ERANGE	/* Set errno as ERANGE.  */ | ||||||
|  |  | ||||||
|  | 	/* No error at all.  Just ret.  */ | ||||||
|  | 	ret | ||||||
|  |  | ||||||
|  | .L_EDOM: | ||||||
|  | 	movi	$r0, #33	/* EDOM: Math arg out of domain of func.  */ | ||||||
|  | 	j	.L_Set_errno | ||||||
|  | .L_ERANGE: | ||||||
|  | 	movi	$r0, #34	/* ERANGE: Math result not representable.  */ | ||||||
|  | .L_Set_errno: | ||||||
|  | 	l.w	$r15, _impure_ptr | ||||||
|  | 	swi	$r0, [$r15]	/* Set errno.  */ | ||||||
|  | 	ret | ||||||
|  | 	.size sqrtf, .-sqrtf | ||||||
		Reference in New Issue
	
	Block a user