newlib: drop unused xscale subdir
This target was deleted in 2011 in 25fa7e5ad6
,
but this directory was missed. Punt it too.
This commit is contained in:
parent
7e6422fd2a
commit
8fff0aac0a
|
@ -1,12 +0,0 @@
|
|||
## Process this file with automake to generate Makefile.in
|
||||
|
||||
AM_CPPFLAGS = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
|
||||
|
||||
AM_CCASFLAGS = $(AM_CPPFLAGS)
|
||||
|
||||
noinst_LIBRARIES = lib.a
|
||||
|
||||
lib_a_SOURCES = \
|
||||
memchr.c memcmp.c memcpy.c memmove.c memset.c \
|
||||
strchr.c strcmp.c strcpy.c strlen.c setjmp.S
|
||||
lib_a_CFLAGS = $(AM_CFLAGS)
|
|
@ -1,598 +0,0 @@
|
|||
# Makefile.in generated by automake 1.15.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2017 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 = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/../../../../config/depstand.m4 \
|
||||
$(top_srcdir)/../../../../config/lead-dot.m4 \
|
||||
$(top_srcdir)/../../../../config/override.m4 \
|
||||
$(top_srcdir)/../../../acinclude.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
|
||||
$(am__configure_deps)
|
||||
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
|
||||
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 =
|
||||
lib_a_AR = $(AR) $(ARFLAGS)
|
||||
lib_a_LIBADD =
|
||||
am_lib_a_OBJECTS = lib_a-memchr.$(OBJEXT) lib_a-memcmp.$(OBJEXT) \
|
||||
lib_a-memcpy.$(OBJEXT) lib_a-memmove.$(OBJEXT) \
|
||||
lib_a-memset.$(OBJEXT) lib_a-strchr.$(OBJEXT) \
|
||||
lib_a-strcmp.$(OBJEXT) lib_a-strcpy.$(OBJEXT) \
|
||||
lib_a-strlen.$(OBJEXT) setjmp.$(OBJEXT)
|
||||
lib_a_OBJECTS = $(am_lib_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@
|
||||
depcomp =
|
||||
am__depfiles_maybe =
|
||||
CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)
|
||||
AM_V_CPPAS = $(am__v_CPPAS_@AM_V@)
|
||||
am__v_CPPAS_ = $(am__v_CPPAS_@AM_DEFAULT_V@)
|
||||
am__v_CPPAS_0 = @echo " CPPAS " $@;
|
||||
am__v_CPPAS_1 =
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
am__v_lt_0 = --silent
|
||||
am__v_lt_1 =
|
||||
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 = $(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
|
||||
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
|
||||
CSCOPE = cscope
|
||||
AM_RECURSIVE_TARGETS = cscope
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
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@
|
||||
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@
|
||||
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@
|
||||
shared_machine_dir = @shared_machine_dir@
|
||||
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@
|
||||
AM_CPPFLAGS = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
|
||||
AM_CCASFLAGS = $(AM_CPPFLAGS)
|
||||
noinst_LIBRARIES = lib.a
|
||||
lib_a_SOURCES = \
|
||||
memchr.c memcmp.c memcpy.c memmove.c memset.c \
|
||||
strchr.c strcmp.c strcpy.c strlen.c setjmp.S
|
||||
|
||||
lib_a_CFLAGS = $(AM_CFLAGS)
|
||||
ACLOCAL_AMFLAGS = -I ../../.. -I ../../../.. -I ../../../../config
|
||||
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .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) --foreign --ignore-deps'; \
|
||||
$(am__cd) $(srcdir) && $(AUTOMAKE) --foreign --ignore-deps \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign --ignore-deps Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign --ignore-deps 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)
|
||||
$(AM_V_at)-rm -f lib.a
|
||||
$(AM_V_AR)$(lib_a_AR) lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
|
||||
$(AM_V_at)$(RANLIB) lib.a
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
.S.o:
|
||||
$(AM_V_CPPAS)$(CPPASCOMPILE) -c -o $@ $<
|
||||
|
||||
.S.obj:
|
||||
$(AM_V_CPPAS)$(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.o:
|
||||
$(AM_V_CC)$(COMPILE) -c -o $@ $<
|
||||
|
||||
.c.obj:
|
||||
$(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
lib_a-memchr.o: memchr.c
|
||||
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memchr.o `test -f 'memchr.c' || echo '$(srcdir)/'`memchr.c
|
||||
|
||||
lib_a-memchr.obj: memchr.c
|
||||
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memchr.obj `if test -f 'memchr.c'; then $(CYGPATH_W) 'memchr.c'; else $(CYGPATH_W) '$(srcdir)/memchr.c'; fi`
|
||||
|
||||
lib_a-memcmp.o: memcmp.c
|
||||
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memcmp.o `test -f 'memcmp.c' || echo '$(srcdir)/'`memcmp.c
|
||||
|
||||
lib_a-memcmp.obj: memcmp.c
|
||||
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memcmp.obj `if test -f 'memcmp.c'; then $(CYGPATH_W) 'memcmp.c'; else $(CYGPATH_W) '$(srcdir)/memcmp.c'; fi`
|
||||
|
||||
lib_a-memcpy.o: memcpy.c
|
||||
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memcpy.o `test -f 'memcpy.c' || echo '$(srcdir)/'`memcpy.c
|
||||
|
||||
lib_a-memcpy.obj: memcpy.c
|
||||
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memcpy.obj `if test -f 'memcpy.c'; then $(CYGPATH_W) 'memcpy.c'; else $(CYGPATH_W) '$(srcdir)/memcpy.c'; fi`
|
||||
|
||||
lib_a-memmove.o: memmove.c
|
||||
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memmove.o `test -f 'memmove.c' || echo '$(srcdir)/'`memmove.c
|
||||
|
||||
lib_a-memmove.obj: memmove.c
|
||||
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memmove.obj `if test -f 'memmove.c'; then $(CYGPATH_W) 'memmove.c'; else $(CYGPATH_W) '$(srcdir)/memmove.c'; fi`
|
||||
|
||||
lib_a-memset.o: memset.c
|
||||
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memset.o `test -f 'memset.c' || echo '$(srcdir)/'`memset.c
|
||||
|
||||
lib_a-memset.obj: memset.c
|
||||
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memset.obj `if test -f 'memset.c'; then $(CYGPATH_W) 'memset.c'; else $(CYGPATH_W) '$(srcdir)/memset.c'; fi`
|
||||
|
||||
lib_a-strchr.o: strchr.c
|
||||
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strchr.o `test -f 'strchr.c' || echo '$(srcdir)/'`strchr.c
|
||||
|
||||
lib_a-strchr.obj: strchr.c
|
||||
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strchr.obj `if test -f 'strchr.c'; then $(CYGPATH_W) 'strchr.c'; else $(CYGPATH_W) '$(srcdir)/strchr.c'; fi`
|
||||
|
||||
lib_a-strcmp.o: strcmp.c
|
||||
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strcmp.o `test -f 'strcmp.c' || echo '$(srcdir)/'`strcmp.c
|
||||
|
||||
lib_a-strcmp.obj: strcmp.c
|
||||
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strcmp.obj `if test -f 'strcmp.c'; then $(CYGPATH_W) 'strcmp.c'; else $(CYGPATH_W) '$(srcdir)/strcmp.c'; fi`
|
||||
|
||||
lib_a-strcpy.o: strcpy.c
|
||||
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strcpy.o `test -f 'strcpy.c' || echo '$(srcdir)/'`strcpy.c
|
||||
|
||||
lib_a-strcpy.obj: strcpy.c
|
||||
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strcpy.obj `if test -f 'strcpy.c'; then $(CYGPATH_W) 'strcpy.c'; else $(CYGPATH_W) '$(srcdir)/strcpy.c'; fi`
|
||||
|
||||
lib_a-strlen.o: strlen.c
|
||||
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strlen.o `test -f 'strlen.c' || echo '$(srcdir)/'`strlen.c
|
||||
|
||||
lib_a-strlen.obj: strlen.c
|
||||
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-strlen.obj `if test -f 'strlen.c'; then $(CYGPATH_W) 'strlen.c'; else $(CYGPATH_W) '$(srcdir)/strlen.c'; fi`
|
||||
|
||||
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"
|
||||
cscope: cscope.files
|
||||
test ! -s cscope.files \
|
||||
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
|
||||
clean-cscope:
|
||||
-rm -f cscope.files
|
||||
cscope.files: clean-cscope cscopelist
|
||||
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
|
||||
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
|
||||
check-am: all-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 TAGS all all-am am--refresh check check-am clean \
|
||||
clean-cscope clean-generic clean-noinstLIBRARIES cscope \
|
||||
cscopelist-am ctags ctags-am 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 tags-am uninstall uninstall-am
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
# 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:
|
|
@ -1,88 +0,0 @@
|
|||
/* profile.h
|
||||
|
||||
Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
|
||||
|
||||
Permission to use, copy, modify, and distribute this software
|
||||
is freely granted, provided that this notice is preserved. */
|
||||
|
||||
#ifndef __XSCALE_PROFILE_H__
|
||||
#define __XSCALE_PROFILE_H__
|
||||
|
||||
/* FIXME:
|
||||
We need to create a string version of the CPP predefined
|
||||
__USER_LABEL_PREFIX__ macro. Ideally we would like to
|
||||
so do something like:
|
||||
|
||||
#if __USER_LABEL_PREFIX__ == _
|
||||
|
||||
but this fails for arm-elf targets because although
|
||||
__USER_LABEL__PREFIX__ is defined, it is not defined to
|
||||
a specific value (even 0) and so the above test fails
|
||||
with:
|
||||
|
||||
operator '==' has no left operand
|
||||
|
||||
Instead we have to test the CPP predefined __ELF__ and
|
||||
rely upon the *assumption* that ELF targets will not use
|
||||
an underscore prefix and that COFF targets will. */
|
||||
|
||||
#ifdef __ELF__
|
||||
#define FOO ""
|
||||
#else
|
||||
#define FOO "_"
|
||||
#endif
|
||||
|
||||
#define _MCOUNT_DECL(frompc, selfpc) \
|
||||
void __attribute__ ((__no_instrument_function__)) \
|
||||
mcount_internal (frompc, selfpc)
|
||||
|
||||
/* mcount_internal expects two arguments
|
||||
r0 frompc (return address for function that call function that calls mcount)
|
||||
r1 selfpc (return address for function that called mcount)
|
||||
|
||||
The frompc is extracted from the stack frames. If the code does not
|
||||
generate stack frames, then mcount cannot extract this
|
||||
information. Thus, the -fomit-frame-pointer optimization cannot be
|
||||
used if a call graph information is required.
|
||||
|
||||
Due to optimizations mcount doesn't set up a new fp. mcount has the fp
|
||||
of the calling function.
|
||||
|
||||
r0 frompc is from the current frame
|
||||
r1 selfpc can be obtained directly from lr. */
|
||||
|
||||
#ifdef __thumb__
|
||||
#define MCOUNT \
|
||||
void __attribute__ ((__naked__)) \
|
||||
__attribute__ ((__no_instrument_function__)) \
|
||||
mcount (void) \
|
||||
{ \
|
||||
__asm__("push {r0, r1, r2, r3, lr};" \
|
||||
"add r0, r7, #0;" \
|
||||
"beq 1f;" \
|
||||
"sub r0, r0, #4;" \
|
||||
"ldr r0, [r0];" \
|
||||
"1: mov r1, lr;" \
|
||||
"bl " FOO "mcount_internal ;" \
|
||||
"pop {r0, r1, r2, r3, pc};" \
|
||||
); \
|
||||
}
|
||||
#else
|
||||
#define MCOUNT \
|
||||
void __attribute__ ((__naked__)) \
|
||||
__attribute__ ((__no_instrument_function__)) \
|
||||
mcount (void) \
|
||||
{ \
|
||||
__asm__("stmdb sp!, {r0, r1, r2, r3, lr};" \
|
||||
"movs r0, fp;" \
|
||||
"ldrne r0, [r0, #-4];" \
|
||||
"mov r1, lr;" \
|
||||
"bl " FOO "mcount_internal ;" \
|
||||
"ldmia sp!, {r0, r1, r2, r3, pc};" \
|
||||
); \
|
||||
}
|
||||
#endif
|
||||
|
||||
#define FUNCTION_ALIGNMENT 2
|
||||
|
||||
#endif /* !__XSCALE_PROFILE_H__ */
|
|
@ -1,102 +0,0 @@
|
|||
#if defined __thumb__
|
||||
|
||||
#include "../../string/memchr.c"
|
||||
|
||||
#else
|
||||
|
||||
#include <string.h>
|
||||
#include "xscale.h"
|
||||
|
||||
void *
|
||||
memchr (const void *start, int c, size_t len)
|
||||
{
|
||||
const char *str = start;
|
||||
|
||||
if (len == 0)
|
||||
return 0;
|
||||
|
||||
asm (PRELOADSTR ("%0") : : "r" (start));
|
||||
|
||||
c &= 0xff;
|
||||
|
||||
#ifndef __OPTIMIZE_SIZE__
|
||||
/* Skip unaligned part. */
|
||||
if ((long)str & 3)
|
||||
{
|
||||
str--;
|
||||
do
|
||||
{
|
||||
if (*++str == c)
|
||||
return (void *)str;
|
||||
}
|
||||
while (((long)str & 3) != 0 && --len > 0);
|
||||
}
|
||||
|
||||
if (len > 3)
|
||||
{
|
||||
unsigned int c2 = c + (c << 8);
|
||||
c2 += c2 << 16;
|
||||
|
||||
/* Load two constants:
|
||||
R7 = 0xfefefeff [ == ~(0x80808080 << 1) ]
|
||||
R6 = 0x80808080 */
|
||||
|
||||
asm (
|
||||
"mov r6, #0x80\n\
|
||||
add r6, r6, #0x8000\n\
|
||||
add r6, r6, r6, lsl #16\n\
|
||||
mvn r7, r6, lsl #1\n\
|
||||
\n\
|
||||
0:\n\
|
||||
cmp %1, #0x7\n\
|
||||
bls 1f\n\
|
||||
\n\
|
||||
ldmia %0!, { r3, r9 }\n\
|
||||
" PRELOADSTR ("%0") "\n\
|
||||
sub %1, %1, #8\n\
|
||||
eor r3, r3, %2\n\
|
||||
eor r9, r9, %2\n\
|
||||
add r2, r3, r7\n\
|
||||
add r8, r9, r7\n\
|
||||
bic r2, r2, r3\n\
|
||||
bic r8, r8, r9\n\
|
||||
and r1, r2, r6\n\
|
||||
and r9, r8, r6\n\
|
||||
orrs r1, r1, r9\n\
|
||||
beq 0b\n\
|
||||
\n\
|
||||
add %1, %1, #8\n\
|
||||
sub %0, %0, #8\n\
|
||||
1:\n\
|
||||
cmp %1, #0x3\n\
|
||||
bls 2f\n\
|
||||
\n\
|
||||
ldr r3, [%0], #4\n\
|
||||
" PRELOADSTR ("%0") "\n\
|
||||
sub %1, %1, #4\n\
|
||||
eor r3, r3, %2\n\
|
||||
add r2, r3, r7\n\
|
||||
bic r2, r2, r3\n\
|
||||
ands r1, r2, r6\n\
|
||||
beq 1b\n\
|
||||
\n\
|
||||
sub %0, %0, #4\n\
|
||||
add %1, %1, #4\n\
|
||||
2:\n\
|
||||
"
|
||||
: "=&r" (str), "=&r" (len)
|
||||
: "r" (c2), "0" (str), "1" (len)
|
||||
: "r1", "r2", "r3", "r6", "r7", "r8", "r9", "cc");
|
||||
}
|
||||
#endif
|
||||
|
||||
while (len-- > 0)
|
||||
{
|
||||
if (*str == c)
|
||||
return (void *)str;
|
||||
str++;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
|
@ -1,112 +0,0 @@
|
|||
#if defined __thumb__
|
||||
|
||||
#include "../../string/memcmp.c"
|
||||
|
||||
#else
|
||||
|
||||
#include <string.h>
|
||||
#include "xscale.h"
|
||||
|
||||
int
|
||||
memcmp (const void * s1, const void * s2, size_t len)
|
||||
{
|
||||
int result;
|
||||
asm (
|
||||
#ifndef __OPTIMIZE_SIZE__
|
||||
"\n\
|
||||
cmp %2, #0x3 @ Is the length a multiple of four ?\n\
|
||||
bls 6f @ no = goto SLOW CHECK\n\
|
||||
and r2, %0, #0x3 @ get alignment of first pointer\n\
|
||||
and r3, %1, #0x3 @ get alignment of second pointer\n\
|
||||
cmp r2, r3 @ Do the two pointers share the same alignment ?\n\
|
||||
bne 6f @ no = goto SLOW CHECK\n\
|
||||
mov lr, %0 @ copy first pointer into LR\n\
|
||||
mov r4, %1 @ copy second pointer into R4\n\
|
||||
cmp r2, #0x0 @ Are we comparing word aligned pointers ?\n\
|
||||
beq 3f @ yes = goto START WORD CHECK LOOP\n\
|
||||
b 1f @ jump to LOOP TEST\n\
|
||||
0: @ LOOP START\n\
|
||||
ldrb r2, [lr], #1 @ load byte from LR, post inc.\n\
|
||||
" PRELOADSTR("lr") " @ preload\n\
|
||||
ldrb r3, [r4], #1 @ load byte from R4, post inc.\n\
|
||||
" PRELOADSTR("r4") " @ preload\n\
|
||||
cmp r2, r3 @ are the two bytes the same ?\n\
|
||||
bne 5f @ no = goto EXIT\n\
|
||||
tst lr, #0x3 @ has the LR become word aligned ?\n\
|
||||
bne 1f @ no = skip the next test\n\
|
||||
cmp %2, #4 @ is the count >= 4 ?\n\
|
||||
bhs 3f @ yes = goto START WORD CHECK LOOP\n\
|
||||
1: @ LOOP TEST\n\
|
||||
sub %2, %2, #1 @ decrement count by one\n\
|
||||
cmn %2, #0x1 @ has the count reached -1 ?\n\
|
||||
bne 0b @ no = loop back to LOOP START\n\
|
||||
b 4f @ goto PASS END\n\
|
||||
\n\
|
||||
0: @ ??\n\
|
||||
cmp %2, #0x7 @ Is the count a multiple of 8 ?\n\
|
||||
bls 3f @ no = goto ???\n\
|
||||
ldmia lr,{r2, r3} @ get two words from first pointer, post inc\n\
|
||||
ldmia r4,{r5, r6} @ get two words from second pointer, post inc\n\
|
||||
sub %2, %2, #0x4 @ decrement count by 4\n\
|
||||
cmp r2, r5 @ has the count reached ????\n\
|
||||
bne 1f @ no = goto\n\
|
||||
sub %2, %2, #0x4 @ decrement the count by 4\n\
|
||||
add lr, lr, #0x4 @ add 4 to first pointer\n\
|
||||
add r4, r4, #0x4 @ add 4 to second pointer\n\
|
||||
cmp r3, r6 @ ???\n\
|
||||
beq 0b @ goto ???\n\
|
||||
1: @ ??\n\
|
||||
add %2, %2, #0x4 @ Add four to count\n\
|
||||
sub %0, lr, #0x4 @ decrement first pointer by 4\n\
|
||||
sub %1, r4, #0x4 @ decrement second pointer by 4\n\
|
||||
b 6f @ goto SLOW CHECK\n\
|
||||
\n\
|
||||
3: @ START WORD CHECK LOOP\n\
|
||||
cmp %2, #0x3 @ is the count <= 3 ?\n\
|
||||
bls 1f @ yes = goto CHECK BYTES BY HAND\n\
|
||||
ldr r2, [lr], #4 @ get word from LR, post inc\n\
|
||||
ldr r3, [r4], #4 @ get word from R4, post inc\n\
|
||||
sub %2, %2, #4 @ decrement count by 4\n\
|
||||
cmp r2, r3 @ are the two words the same ?\n\
|
||||
bne 1f @ no = goto CHECK WORD CONTENTS\n\
|
||||
0: @ WORD CHECK LOOP\n\
|
||||
cmp %2, #0x3 @ is the count <= 3 ?\n\
|
||||
bls 1f @ yes = goto CHECK BYTES BY HAND\n\
|
||||
ldr r2, [lr], #4 @ load word from LR, post inc\n\
|
||||
" PRELOADSTR("lr") " @ preload\n\
|
||||
ldr r3, [r4], #4 @ load word from R4, post inc\n\
|
||||
" PRELOADSTR("r4") " @ preload\n\
|
||||
sub %2, %2, #4 @ decrement count by 4\n\
|
||||
cmp r2, r3 @ are the two words the same ?\n\
|
||||
beq 0b @ yes = goto WORD CHECK LOOP\n\
|
||||
1: @ CHECK BYTES BY HAND\n\
|
||||
sub %0, lr, #0x4 @ move LR back a word and put into first pointer\n\
|
||||
sub %1, r4, #0x4 @ move R4 back a word and put into second pointer\n\
|
||||
add %2, %2, #4 @ increment the count by 4\n\
|
||||
@ fall through into SLOW CHECK"
|
||||
#endif /* !__OPTIMIZE_SIZE__ */
|
||||
"\n\
|
||||
6: @ SLOW CHECK\n\
|
||||
sub %2, %2, #1 @ Decrement the count by one\n\
|
||||
cmn %2, #0x1 @ Has the count reached -1 ?\n\
|
||||
beq 4f @ Yes - we are finished, goto PASS END\n\
|
||||
0: @ LOOP1\n\
|
||||
ldrb r2, [%0], #1 @ get byte from first pointer\n\
|
||||
" PRELOADSTR("%0") " @ preload first pointer\n\
|
||||
ldrb r3, [%1], #1 @ get byte from second pointer\n\
|
||||
" PRELOADSTR("%1") " @ preload second pointer\n\
|
||||
cmp r2, r3 @ compare the two loaded bytes\n\
|
||||
bne 5f @ if they are not equal goto EXIT\n\
|
||||
sub %2, %2, #1 @ decremented count by 1\n\
|
||||
cmn %2, #0x1 @ has the count reached -1 ?\n\
|
||||
bne 0b @ no = then go back to LOOP1\n\
|
||||
4: @ PASS END\n\
|
||||
mov r3, r2 @ Default return value is 0\n\
|
||||
5: @ EXIT\n\
|
||||
rsb %0, r3, r2 @ return difference between last two bytes loaded"
|
||||
: "=r" (result), "=&r" (s2), "=&r" (len)
|
||||
: "0" (s1), "1" (s2), "2" (len)
|
||||
: "r2", "r3", "r4", "r5", "r6", "cc", "lr");
|
||||
return result;
|
||||
}
|
||||
#endif
|
|
@ -1,103 +0,0 @@
|
|||
#if defined __thumb__
|
||||
|
||||
#include "../../string/memcpy.c"
|
||||
|
||||
#else
|
||||
|
||||
#include <string.h>
|
||||
#include "xscale.h"
|
||||
#include "../../string/local.h"
|
||||
|
||||
void *
|
||||
__inhibit_loop_to_libcall
|
||||
memcpy (void *__restrict dst0, const void *__restrict src0, size_t len)
|
||||
{
|
||||
int dummy;
|
||||
asm volatile (
|
||||
#ifndef __OPTIMIZE_SIZE__
|
||||
"cmp %2, #0x3\n\
|
||||
bls 3f\n\
|
||||
and lr, %1, #0x3\n\
|
||||
and r3, %0, #0x3\n\
|
||||
cmp lr, r3\n\
|
||||
bne 3f\n\
|
||||
cmp lr, #0x0\n\
|
||||
beq 2f\n\
|
||||
b 1f\n\
|
||||
0:\n\
|
||||
ldrb r3, [%1], #1\n\
|
||||
"
|
||||
PRELOADSTR ("%1")
|
||||
"\n\
|
||||
tst %1, #0x3\n\
|
||||
strb r3, [%0], #1\n\
|
||||
beq 3f\n\
|
||||
1:\n\
|
||||
sub %2, %2, #1\n\
|
||||
cmn %2, #1\n\
|
||||
bne 0b\n\
|
||||
2:\n\
|
||||
cmp %2, #0xf\n\
|
||||
bls 1f\n\
|
||||
0:\n\
|
||||
ldmia %1!, { r3, r4, r5, lr }\n\
|
||||
"
|
||||
PRELOADSTR ("%1")
|
||||
"\n\
|
||||
\n\
|
||||
sub %2, %2, #16\n\
|
||||
cmp %2, #0xf\n\
|
||||
stmia %0!, { r3, r4, r5, lr }\n\
|
||||
bhi 0b\n\
|
||||
1:\n\
|
||||
cmp %2, #0x7\n\
|
||||
bls 1f\n\
|
||||
0:\n\
|
||||
ldmia %1!, { r3, r4 }\n\
|
||||
"
|
||||
PRELOADSTR ("%1")
|
||||
"\n\
|
||||
\n\
|
||||
sub %2, %2, #8\n\
|
||||
cmp %2, #0x7\n\
|
||||
stmia %0!, { r3, r4 }\n\
|
||||
bhi 0b\n\
|
||||
1:\n\
|
||||
cmp %2, #0x3\n\
|
||||
bls 3f\n\
|
||||
0:\n\
|
||||
sub %2, %2, #4\n\
|
||||
ldr r3, [%1], #4\n\
|
||||
"
|
||||
PRELOADSTR ("%1")
|
||||
"\n\
|
||||
\n\
|
||||
cmp %2, #0x3\n\
|
||||
str r3, [%0], #4\n\
|
||||
bhi 0b\n\
|
||||
"
|
||||
#endif /* !__OPTIMIZE_SIZE__ */
|
||||
"\n\
|
||||
3:\n\
|
||||
"
|
||||
PRELOADSTR ("%1")
|
||||
"\n\
|
||||
sub %2, %2, #1\n\
|
||||
cmn %2, #1\n\
|
||||
beq 1f\n\
|
||||
0:\n\
|
||||
sub %2, %2, #1\n\
|
||||
ldrb r3, [%1], #1\n\
|
||||
"
|
||||
PRELOADSTR ("%1")
|
||||
"\n\
|
||||
cmn %2, #1\n\
|
||||
strb r3, [%0], #1\n\
|
||||
bne 0b\n\
|
||||
1:"
|
||||
: "=&r" (dummy), "=&r" (src0), "=&r" (len)
|
||||
: "0" (dst0), "1" (src0), "2" (len)
|
||||
: "memory", "lr", "r3", "r4", "r5", "cc");
|
||||
return dst0;
|
||||
}
|
||||
#endif
|
|
@ -1,122 +0,0 @@
|
|||
#if defined __thumb__
|
||||
|
||||
#include "../../string/memmove.c"
|
||||
|
||||
#else
|
||||
|
||||
#include <string.h>
|
||||
#include "xscale.h"
|
||||
|
||||
static inline void *
|
||||
do_memcpy (void *dst0, const void *src0, size_t len)
|
||||
{
|
||||
int dummy;
|
||||
asm volatile (
|
||||
#ifndef __OPTIMIZE_SIZE__
|
||||
"cmp %2, #0x3\n\
|
||||
bls 3f\n\
|
||||
and lr, %1, #0x3\n\
|
||||
and r3, %0, #0x3\n\
|
||||
cmp lr, r3\n\
|
||||
bne 3f\n\
|
||||
cmp lr, #0x0\n\
|
||||
beq 2f\n\
|
||||
b 1f\n\
|
||||
0:\n\
|
||||
ldrb r3, [%1], #1\n\
|
||||
"
|
||||
PRELOADSTR ("%1")
|
||||
"\n\
|
||||
tst %1, #0x3\n\
|
||||
strb r3, [%0], #1\n\
|
||||
beq 3f\n\
|
||||
1:\n\
|
||||
sub %2, %2, #1\n\
|
||||
cmn %2, #1\n\
|
||||
bne 0b\n\
|
||||
2:\n\
|
||||
cmp %2, #0xf\n\
|
||||
bls 1f\n\
|
||||
0:\n\
|
||||
ldmia %1!, { r3, r4, r5, lr }\n\
|
||||
"
|
||||
PRELOADSTR ("%1")
|
||||
"\n\
|
||||
\n\
|
||||
sub %2, %2, #16\n\
|
||||
cmp %2, #0xf\n\
|
||||
stmia %0!, { r3, r4, r5, lr }\n\
|
||||
bhi 0b\n\
|
||||
1:\n\
|
||||
cmp %2, #0x7\n\
|
||||
bls 1f\n\
|
||||
0:\n\
|
||||
ldmia %1!, { r3, r4 }\n\
|
||||
"
|
||||
PRELOADSTR ("%1")
|
||||
"\n\
|
||||
\n\
|
||||
sub %2, %2, #8\n\
|
||||
cmp %2, #0x7\n\
|
||||
stmia %0!, { r3, r4 }\n\
|
||||
bhi 0b\n\
|
||||
1:\n\
|
||||
cmp %2, #0x3\n\
|
||||
bls 3f\n\
|
||||
0:\n\
|
||||
sub %2, %2, #4\n\
|
||||
ldr r3, [%1], #4\n\
|
||||
"
|
||||
PRELOADSTR ("%1")
|
||||
"\n\
|
||||
\n\
|
||||
cmp %2, #0x3\n\
|
||||
str r3, [%0], #4\n\
|
||||
bhi 0b\n\
|
||||
"
|
||||
#endif /* !__OPTIMIZE_SIZE__ */
|
||||
"\n\
|
||||
3:\n\
|
||||
"
|
||||
PRELOADSTR ("%1")
|
||||
"\n\
|
||||
sub %2, %2, #1\n\
|
||||
cmn %2, #1\n\
|
||||
beq 1f\n\
|
||||
0:\n\
|
||||
sub %2, %2, #1\n\
|
||||
ldrb r3, [%1], #1\n\
|
||||
"
|
||||
PRELOADSTR ("%1")
|
||||
"\n\
|
||||
cmn %2, #1\n\
|
||||
strb r3, [%0], #1\n\
|
||||
bne 0b\n\
|
||||
1:"
|
||||
: "=&r" (dummy), "=&r" (src0), "=&r" (len)
|
||||
: "0" (dst0), "1" (src0), "2" (len)
|
||||
: "memory", "lr", "r3", "r4", "r5", "cc");
|
||||
return dst0;
|
||||
}
|
||||
|
||||
void *
|
||||
memmove (void *dst, const void *src, size_t len)
|
||||
{
|
||||
char *d = dst;
|
||||
const char *s = src;
|
||||
|
||||
if (s < d && d < s + len)
|
||||
{
|
||||
/* Destructive overlap...have to copy backwards. */
|
||||
s += len;
|
||||
d += len;
|
||||
|
||||
while (len--)
|
||||
*--d = *--s;
|
||||
|
||||
return dst;
|
||||
}
|
||||
else
|
||||
return do_memcpy (dst, src, len);
|
||||
}
|
||||
#endif
|
|
@ -1,91 +0,0 @@
|
|||
#if defined __thumb__
|
||||
|
||||
#include "../../string/memset.c"
|
||||
|
||||
#else
|
||||
|
||||
#include <string.h>
|
||||
#include "xscale.h"
|
||||
#include "../../string/local.h"
|
||||
|
||||
void *
|
||||
__inhibit_loop_to_libcall
|
||||
memset (void *dst, int c, size_t len)
|
||||
{
|
||||
int dummy;
|
||||
|
||||
asm volatile ("tst %0, #0x3"
|
||||
#ifndef __OPTIMIZE_SIZE__
|
||||
"\n\
|
||||
beq 1f\n\
|
||||
b 2f\n\
|
||||
0:\n\
|
||||
strb %1, [%0], #1\n\
|
||||
tst %0, #0x3\n\
|
||||
beq 1f\n\
|
||||
2:\n\
|
||||
movs r3, %2\n\
|
||||
sub %2, %2, #1\n\
|
||||
bne 0b\n\
|
||||
# At this point we know that %2 == len == -1 (since the SUB has already taken\n\
|
||||
# place). If we fall through to the 1: label (as the code used to do), the\n\
|
||||
# CMP will detect this negative value and branch to the 2: label. This will\n\
|
||||
# test %2 again, but this time against 0. The test will fail and the loop\n\
|
||||
# at 2: will go on for (almost) ever. Hence the explicit branch to the end\n\
|
||||
# of the hand written assembly code.\n\
|
||||
b 4f\n\
|
||||
1:\n\
|
||||
cmp %2, #0x3\n\
|
||||
bls 2f\n\
|
||||
and %1, %1, #0xff\n\
|
||||
orr lr, %1, %1, asl #8\n\
|
||||
cmp %2, #0xf\n\
|
||||
orr lr, lr, lr, asl #16\n\
|
||||
bls 1f\n\
|
||||
mov r3, lr\n\
|
||||
mov r4, lr\n\
|
||||
mov r5, lr\n\
|
||||
0:\n\
|
||||
sub %2, %2, #16\n\
|
||||
stmia %0!, { r3, r4, r5, lr }\n\
|
||||
cmp %2, #0xf\n\
|
||||
bhi 0b\n\
|
||||
1:\n\
|
||||
cmp %2, #0x7\n\
|
||||
bls 1f\n\
|
||||
mov r3, lr\n\
|
||||
0:\n\
|
||||
sub %2, %2, #8\n\
|
||||
stmia %0!, { r3, lr }\n\
|
||||
cmp %2, #0x7\n\
|
||||
bhi 0b\n\
|
||||
1:\n\
|
||||
cmp %2, #0x3\n\
|
||||
bls 2f\n\
|
||||
0:\n\
|
||||
sub %2, %2, #4\n\
|
||||
str lr, [%0], #4\n\
|
||||
cmp %2, #0x3\n\
|
||||
bhi 0b\n\
|
||||
"
|
||||
#endif /* !__OPTIMIZE_SIZE__ */
|
||||
"\n\
|
||||
2:\n\
|
||||
movs r3, %2\n\
|
||||
sub %2, %2, #1\n\
|
||||
beq 4f\n\
|
||||
0:\n\
|
||||
movs r3, %2\n\
|
||||
sub %2, %2, #1\n\
|
||||
strb %1, [%0], #1\n\
|
||||
bne 0b\n\
|
||||
4:"
|
||||
|
||||
: "=&r" (dummy), "=&r" (c), "=&r" (len)
|
||||
: "0" (dst), "1" (c), "2" (len)
|
||||
: "memory", "r3", "r4", "r5", "lr");
|
||||
|
||||
return dst;
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,137 +0,0 @@
|
|||
/* This is a simple version of setjmp and longjmp.
|
||||
|
||||
Nick Clifton, Cygnus Solutions, 13 June 1997. */
|
||||
|
||||
/* ANSI concatenation macros. */
|
||||
#define CONCAT(a, b) CONCAT2(a, b)
|
||||
#define CONCAT2(a, b) a##b
|
||||
|
||||
#ifndef __USER_LABEL_PREFIX__
|
||||
#error __USER_LABEL_PREFIX__ not defined
|
||||
#endif
|
||||
|
||||
#define SYM(x) CONCAT (__USER_LABEL_PREFIX__, x)
|
||||
|
||||
#ifdef __ELF__
|
||||
#define TYPE(x) .type SYM(x),function
|
||||
#define SIZE(x) .size SYM(x), . - SYM(x)
|
||||
#else
|
||||
#define TYPE(x)
|
||||
#define SIZE(x)
|
||||
#endif
|
||||
|
||||
/* Arm/Thumb interworking support:
|
||||
|
||||
The interworking scheme expects functions to use a BX instruction
|
||||
to return control to their parent. Since we need this code to work
|
||||
in both interworked and non-interworked environments as well as with
|
||||
older processors which do not have the BX instruction we do the
|
||||
following:
|
||||
Test the return address.
|
||||
If the bottom bit is clear perform an "old style" function exit.
|
||||
(We know that we are in ARM mode and returning to an ARM mode caller).
|
||||
Otherwise use the BX instruction to perform the function exit.
|
||||
|
||||
We know that we will never attempt to perform the BX instruction on
|
||||
an older processor, because that kind of processor will never be
|
||||
interworked, and a return address with the bottom bit set will never
|
||||
be generated.
|
||||
|
||||
In addition, we do not actually assemble the BX instruction as this would
|
||||
require us to tell the assembler that the processor is an ARM7TDMI and
|
||||
it would store this information in the binary. We want this binary to be
|
||||
able to be linked with binaries compiled for older processors however, so
|
||||
we do not want such information stored there.
|
||||
|
||||
If we are running using the APCS-26 convention however, then we never
|
||||
test the bottom bit, because this is part of the processor status.
|
||||
Instead we just do a normal return, since we know that we cannot be
|
||||
returning to a Thumb caller - the Thumb does not support APCS-26.
|
||||
|
||||
Function entry is much simpler. If we are compiling for the Thumb we
|
||||
just switch into ARM mode and then drop through into the rest of the
|
||||
function. The function exit code will take care of the restore to
|
||||
Thumb mode. */
|
||||
|
||||
#ifdef __APCS_26__
|
||||
#define RET movs pc, lr
|
||||
#else
|
||||
#define RET tst lr, #1; \
|
||||
moveq pc, lr ; \
|
||||
.word 0xe12fff1e /* bx lr */
|
||||
#endif
|
||||
|
||||
#ifdef __thumb__
|
||||
#define MODE .thumb_func
|
||||
.macro PROLOGUE name
|
||||
.code 16
|
||||
bx pc
|
||||
nop
|
||||
.code 32
|
||||
SYM (.arm_start_of.\name):
|
||||
.endm
|
||||
#else
|
||||
#define MODE .code 32
|
||||
.macro PROLOGUE name
|
||||
.endm
|
||||
#endif
|
||||
|
||||
.macro FUNC_START name
|
||||
.text
|
||||
.align 2
|
||||
MODE
|
||||
.globl SYM (\name)
|
||||
TYPE (\name)
|
||||
SYM (\name):
|
||||
PROLOGUE \name
|
||||
.endm
|
||||
|
||||
.macro FUNC_END name
|
||||
RET
|
||||
SIZE (\name)
|
||||
.endm
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
int setjmp (jmp_buf);
|
||||
-------------------------------------------------------------------- */
|
||||
|
||||
FUNC_START setjmp
|
||||
|
||||
/* Save all the callee-preserved registers into the jump buffer. */
|
||||
stmea a1!, { v1-v7, fp, ip, sp, lr }
|
||||
|
||||
#if 0 /* Simulator does not cope with FP instructions yet. */
|
||||
#ifndef __SOFTFP__
|
||||
/* Save the floating point registers. */
|
||||
sfmea f4, 4, [a1]
|
||||
#endif
|
||||
#endif
|
||||
/* When setting up the jump buffer return 0. */
|
||||
mov a1, #0
|
||||
|
||||
FUNC_END setjmp
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
volatile void longjmp (jmp_buf, int);
|
||||
-------------------------------------------------------------------- */
|
||||
|
||||
FUNC_START longjmp
|
||||
|
||||
/* If we have stack extension code it ought to be handled here. */
|
||||
|
||||
/* Restore the registers, retrieving the state when setjmp() was called. */
|
||||
ldmfd a1!, { v1-v7, fp, ip, sp, lr }
|
||||
|
||||
#if 0 /* Simulator does not cope with FP instructions yet. */
|
||||
#ifndef __SOFTFP__
|
||||
/* Restore floating point registers as well. */
|
||||
lfmfd f4, 4, [a1]
|
||||
#endif
|
||||
#endif
|
||||
/* Put the return value into the integer result register.
|
||||
But if it is zero then return 1 instead. */
|
||||
movs a1, a2
|
||||
moveq a1, #1
|
||||
|
||||
FUNC_END longjmp
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
#if defined __thumb__
|
||||
|
||||
#include "../../string/strchr.c"
|
||||
|
||||
#else
|
||||
|
||||
#include <string.h>
|
||||
#include "xscale.h"
|
||||
|
||||
char *
|
||||
strchr (const char *s, int c)
|
||||
{
|
||||
unsigned int c2;
|
||||
asm (PRELOADSTR ("%0") : : "r" (s));
|
||||
|
||||
c &= 0xff;
|
||||
|
||||
#ifndef __OPTIMIZE_SIZE__
|
||||
/* Skip unaligned part. */
|
||||
if ((long)s & 3)
|
||||
{
|
||||
s--;
|
||||
do
|
||||
{
|
||||
int c2 = *++s;
|
||||
if (c2 == c)
|
||||
return (char *)s;
|
||||
if (c2 == '\0')
|
||||
return 0;
|
||||
}
|
||||
while (((long)s & 3) != 0);
|
||||
}
|
||||
|
||||
c2 = c + (c << 8);
|
||||
c2 += c2 << 16;
|
||||
|
||||
/* Load two constants:
|
||||
R6 = 0xfefefeff [ == ~(0x80808080 << 1) ]
|
||||
R5 = 0x80808080 */
|
||||
|
||||
asm (PRELOADSTR ("%0") "\n\
|
||||
mov r5, #0x80\n\
|
||||
add r5, r5, #0x8000\n\
|
||||
add r5, r5, r5, lsl #16\n\
|
||||
mvn r6, r5, lsl #1\n\
|
||||
\n\
|
||||
sub %0, %0, #4\n\
|
||||
0:\n\
|
||||
ldr r1, [%0, #4]!\n\
|
||||
" PRELOADSTR ("%0") "\n\
|
||||
add r3, r1, r6\n\
|
||||
bic r3, r3, r1\n\
|
||||
ands r2, r3, r5\n\
|
||||
bne 1f\n\
|
||||
eor r2, r1, %1\n\
|
||||
add r3, r2, r6\n\
|
||||
bic r3, r3, r2\n\
|
||||
ands r1, r3, r5\n\
|
||||
beq 0b\n\
|
||||
1:"
|
||||
: "=&r" (s)
|
||||
: "r" (c2), "0" (s)
|
||||
: "r1", "r2", "r3", "r5", "r6", "cc");
|
||||
#endif
|
||||
|
||||
while (*s && *s != c)
|
||||
s++;
|
||||
if (*s == c)
|
||||
return (char *)s;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,107 +0,0 @@
|
|||
#if defined __thumb__
|
||||
|
||||
#include "../../string/strcmp.c"
|
||||
|
||||
#else
|
||||
|
||||
#include <string.h>
|
||||
#include "xscale.h"
|
||||
|
||||
int
|
||||
strcmp (const char *s1, const char *s2)
|
||||
{
|
||||
asm (PRELOADSTR ("%0") : : "r" (s1));
|
||||
asm (PRELOADSTR ("%0") : : "r" (s2));
|
||||
|
||||
#ifndef __OPTIMIZE_SIZE__
|
||||
if (((long)s1 & 3) == ((long)s2 & 3))
|
||||
{
|
||||
int result;
|
||||
|
||||
/* Skip unaligned part. */
|
||||
while ((long)s1 & 3)
|
||||
{
|
||||
if (*s1 == '\0' || *s1 != *s2)
|
||||
goto out;
|
||||
s1++;
|
||||
s2++;
|
||||
}
|
||||
|
||||
/* Load two constants:
|
||||
lr = 0xfefefeff [ == ~(0x80808080 << 1) ]
|
||||
ip = 0x80808080 */
|
||||
|
||||
asm (
|
||||
"ldr r2, [%1, #0]\n\
|
||||
ldr r3, [%2, #0]\n\
|
||||
cmp r2, r3\n\
|
||||
bne 2f\n\
|
||||
\n\
|
||||
mov ip, #0x80\n\
|
||||
add ip, ip, #0x8000\n\
|
||||
add ip, ip, ip, lsl #16\n\
|
||||
mvn lr, ip, lsl #1\n\
|
||||
\n\
|
||||
0:\n\
|
||||
ldr r2, [%1, #0]\n\
|
||||
add r3, r2, lr\n\
|
||||
bic r3, r3, r2\n\
|
||||
tst r3, ip\n\
|
||||
beq 1f\n\
|
||||
mov %0, #0x0\n\
|
||||
b 3f\n\
|
||||
1:\n\
|
||||
ldr r2, [%1, #4]!\n\
|
||||
ldr r3, [%2, #4]!\n\
|
||||
" PRELOADSTR("%1") "\n\
|
||||
" PRELOADSTR("%2") "\n\
|
||||
cmp r2, r3\n\
|
||||
beq 0b"
|
||||
|
||||
/* The following part could be done in a C loop as well, but it needs
|
||||
to be assembler to save some cycles in the case where the optimized
|
||||
loop above finds the strings to be equal. */
|
||||
"\n\
|
||||
2:\n\
|
||||
ldrb r2, [%1, #0]\n\
|
||||
" PRELOADSTR("%1") "\n\
|
||||
" PRELOADSTR("%2") "\n\
|
||||
cmp r2, #0x0\n\
|
||||
beq 1f\n\
|
||||
ldrb r3, [%2, #0]\n\
|
||||
cmp r2, r3\n\
|
||||
bne 1f\n\
|
||||
0:\n\
|
||||
ldrb r3, [%1, #1]!\n\
|
||||
add %2, %2, #1\n\
|
||||
ands ip, r3, #0xff\n\
|
||||
beq 1f\n\
|
||||
ldrb r3, [%2]\n\
|
||||
cmp ip, r3\n\
|
||||
beq 0b\n\
|
||||
1:\n\
|
||||
ldrb lr, [%1, #0]\n\
|
||||
ldrb ip, [%2, #0]\n\
|
||||
rsb %0, ip, lr\n\
|
||||
3:\n\
|
||||
"
|
||||
|
||||
: "=r" (result), "=&r" (s1), "=&r" (s2)
|
||||
: "1" (s1), "2" (s2)
|
||||
: "lr", "ip", "r2", "r3", "cc");
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
while (*s1 != '\0' && *s1 == *s2)
|
||||
{
|
||||
asm (PRELOADSTR("%0") : : "r" (s1));
|
||||
asm (PRELOADSTR("%0") : : "r" (s2));
|
||||
s1++;
|
||||
s2++;
|
||||
}
|
||||
out:
|
||||
return (*(unsigned char *) s1) - (*(unsigned char *) s2);
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,62 +0,0 @@
|
|||
#if defined __thumb__
|
||||
|
||||
#include "../../string/strcpy.c"
|
||||
|
||||
#else
|
||||
|
||||
#include <string.h>
|
||||
#include "xscale.h"
|
||||
|
||||
char *
|
||||
strcpy (char *dest, const char *src)
|
||||
{
|
||||
char *dest0 = dest;
|
||||
|
||||
asm (PRELOADSTR ("%0") : : "r" (src));
|
||||
|
||||
#ifndef __OPTIMIZE_SIZE__
|
||||
if (((long)src & 3) == ((long)dest & 3))
|
||||
{
|
||||
/* Skip unaligned part. */
|
||||
while ((long)src & 3)
|
||||
{
|
||||
if (! (*dest++ = *src++))
|
||||
return dest0;
|
||||
}
|
||||
|
||||
/* Load two constants:
|
||||
R4 = 0xfefefeff [ == ~(0x80808080 << 1) ]
|
||||
R5 = 0x80808080 */
|
||||
|
||||
asm ("mov r5, #0x80\n\
|
||||
ldr r1, [%1, #0]\n\
|
||||
add r5, r5, #0x8000\n\
|
||||
add r5, r5, r5, lsl #16\n\
|
||||
mvn r4, r5, lsl #1\n\
|
||||
\n\
|
||||
add r3, r1, r5\n\
|
||||
bic r3, r3, r1\n\
|
||||
ands r2, r3, r4\n\
|
||||
bne 1f\n\
|
||||
0:\n\
|
||||
ldr r3, [%1, #0]\n\
|
||||
ldr r1, [%1, #4]!\n\
|
||||
" PRELOADSTR("%1") "\n\
|
||||
str r3, [%0], #4\n\
|
||||
add r2, r1, r4\n\
|
||||
bic r2, r2, r1\n\
|
||||
ands r3, r2, r5\n\
|
||||
beq 0b\n\
|
||||
1:"
|
||||
: "=&r" (dest), "=&r" (src)
|
||||
: "0" (dest), "1" (src)
|
||||
: "r1", "r2", "r3", "r4", "r5", "memory", "cc");
|
||||
}
|
||||
#endif
|
||||
|
||||
while (*dest++ = *src++)
|
||||
asm (PRELOADSTR ("%0") : : "r" (src));
|
||||
return dest0;
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,100 +0,0 @@
|
|||
#if defined __thumb__ || defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__)
|
||||
|
||||
#include "../../string/strlen.c"
|
||||
|
||||
#else
|
||||
|
||||
#include <string.h>
|
||||
#include "xscale.h"
|
||||
|
||||
size_t
|
||||
strlen (const char *str)
|
||||
{
|
||||
const char *start = str;
|
||||
|
||||
/* Skip unaligned part. */
|
||||
if ((long)str & 3)
|
||||
{
|
||||
str--;
|
||||
do
|
||||
{
|
||||
if (*++str == '\0')
|
||||
goto out;
|
||||
}
|
||||
while ((long)str & 3);
|
||||
}
|
||||
|
||||
/* Load two constants:
|
||||
R4 = 0xfefefeff [ == ~(0x80808080 << 1) ]
|
||||
R5 = 0x80808080 */
|
||||
|
||||
asm ("mov r5, #0x80\n\
|
||||
add r5, r5, #0x8000\n\
|
||||
add r5, r5, r5, lsl #16\n\
|
||||
mvn r4, r5, lsl #1\n\
|
||||
"
|
||||
|
||||
#if defined __ARM_ARCH_5__ || defined __ARM_ARCH_5T__ || defined __ARM_ARCH_5E__ || defined __ARM_ARCH_5TE__
|
||||
|
||||
" tst %0, #0x7\n\
|
||||
ldreqd r6, [%0]\n\
|
||||
beq 1f\n\
|
||||
ldr r2, [%0]\n\
|
||||
add r3, r2, r4\n\
|
||||
bic r3, r3, r2\n\
|
||||
ands r2, r3, r5\n\
|
||||
bne 2f\n\
|
||||
sub %0, %0, #4\n\
|
||||
\n\
|
||||
0:\n\
|
||||
ldrd r6, [%0, #8]!\n\
|
||||
"
|
||||
PRELOADSTR ("%0")
|
||||
"\n\
|
||||
1:\n\
|
||||
add r3, r6, r4\n\
|
||||
add r2, r7, r4\n\
|
||||
bic r3, r3, r6\n\
|
||||
bic r2, r2, r7\n\
|
||||
and r3, r3, r5\n\
|
||||
and r2, r2, r5\n\
|
||||
orrs r3, r2, r3\n\
|
||||
beq 0b\n\
|
||||
"
|
||||
#else
|
||||
|
||||
" sub %0, %0, #4\n\
|
||||
\n\
|
||||
0:\n\
|
||||
ldr r6, [%0, #4]!\n\
|
||||
"
|
||||
PRELOADSTR ("%0")
|
||||
"\n\
|
||||
add r3, r6, r4\n\
|
||||
bic r3, r3, r6\n\
|
||||
ands r3, r3, r5\n\
|
||||
beq 0b\n\
|
||||
"
|
||||
#endif /* __ARM_ARCH_5[T][E]__ */
|
||||
"\n\
|
||||
2:\n\
|
||||
ldrb r3, [%0]\n\
|
||||
cmp r3, #0x0\n\
|
||||
beq 1f\n\
|
||||
\n\
|
||||
0:\n\
|
||||
ldrb r3, [%0, #1]!\n\
|
||||
"
|
||||
PRELOADSTR ("%0")
|
||||
"\n\
|
||||
cmp r3, #0x0\n\
|
||||
bne 0b\n\
|
||||
1:\n\
|
||||
"
|
||||
: "=r" (str) : "0" (str) : "r2", "r3", "r4", "r5", "r6", "r7");
|
||||
|
||||
out:
|
||||
return str - start;
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,31 +0,0 @@
|
|||
#ifndef __XSCALE_MACH_H__
|
||||
#define __XSCALE_MACH_H__
|
||||
|
||||
/* These are predefined by new versions of GNU cpp. */
|
||||
|
||||
#ifndef __USER_LABEL_PREFIX__
|
||||
#define __USER_LABEL_PREFIX__ _
|
||||
#endif
|
||||
|
||||
#ifndef __REGISTER_PREFIX__
|
||||
#define __REGISTER_PREFIX__
|
||||
#endif
|
||||
|
||||
/* ANSI concatenation macros. */
|
||||
|
||||
#define CONCAT1(a, b) CONCAT2(a, b)
|
||||
#define CONCAT2(a, b) a##b
|
||||
|
||||
/* Use the right prefix for global labels. */
|
||||
|
||||
#define SYM(x) CONCAT1(__USER_LABEL_PREFIX__, x)
|
||||
|
||||
#ifdef __XSCALE__
|
||||
#define PRELOAD(X) pld [X]
|
||||
#define PRELOADSTR(X) " pld [" X "]"
|
||||
#else
|
||||
#define PRELOAD(X)
|
||||
#define PRELOADSTR(X) ""
|
||||
#endif /* __XSCALE__ */
|
||||
|
||||
#endif /* !__XSCALE_MACH_H__ */
|
Loading…
Reference in New Issue